Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Issue 632203002: More string literals getters. (Closed)

Created:
6 years, 2 months ago by scheglov
Modified:
6 years, 2 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

More string literals getters. To use in the inline local refactoring. 1. We can unwrap a literal only if its `isSingleQuoted` is the same as of the target literal. 2. We can unwrap a single-line literal into a multi-line one, but not vice versa. R=brianwilkerson@google.com, paulberry@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=40957

Patch Set 1 #

Total comments: 12

Patch Set 2 : Check strings start instead of end #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -12 lines) Patch
M pkg/analyzer/lib/src/generated/ast.dart View 1 3 chunks +53 lines, -6 lines 3 comments Download
M pkg/analyzer/pubspec.yaml View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer/test/generated/ast_test.dart View 1 4 chunks +135 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
scheglov
6 years, 2 months ago (2014-10-07 04:44:57 UTC) #1
Paul Berry
lgtm. Your call on the comments. https://codereview.chromium.org/632203002/diff/1/pkg/analyzer/lib/src/generated/ast.dart File pkg/analyzer/lib/src/generated/ast.dart (right): https://codereview.chromium.org/632203002/diff/1/pkg/analyzer/lib/src/generated/ast.dart#newcode16063 pkg/analyzer/lib/src/generated/ast.dart:16063: return StringUtilities.endsWithChar(lexeme, 0x27); ...
6 years, 2 months ago (2014-10-07 13:18:04 UTC) #2
Brian Wilkerson
LGTM https://codereview.chromium.org/632203002/diff/1/pkg/analyzer/lib/src/generated/ast.dart File pkg/analyzer/lib/src/generated/ast.dart (right): https://codereview.chromium.org/632203002/diff/1/pkg/analyzer/lib/src/generated/ast.dart#newcode16063 pkg/analyzer/lib/src/generated/ast.dart:16063: return StringUtilities.endsWithChar(lexeme, 0x27); > Would it be better ...
6 years, 2 months ago (2014-10-07 14:12:04 UTC) #3
scheglov
PTAL https://codereview.chromium.org/632203002/diff/1/pkg/analyzer/lib/src/generated/ast.dart File pkg/analyzer/lib/src/generated/ast.dart (right): https://codereview.chromium.org/632203002/diff/1/pkg/analyzer/lib/src/generated/ast.dart#newcode16063 pkg/analyzer/lib/src/generated/ast.dart:16063: return StringUtilities.endsWithChar(lexeme, 0x27); On 2014/10/07 13:18:04, Paul Berry ...
6 years, 2 months ago (2014-10-07 15:37:57 UTC) #4
Brian Wilkerson
LGTM
6 years, 2 months ago (2014-10-07 15:45:23 UTC) #5
scheglov
Committed patchset #2 (id:20001) manually as 40957 (presubmit successful).
6 years, 2 months ago (2014-10-07 15:51:11 UTC) #6
Paul Berry
lgtm with the "length < 3" issue addressed. https://codereview.chromium.org/632203002/diff/20001/pkg/analyzer/lib/src/generated/ast.dart File pkg/analyzer/lib/src/generated/ast.dart (right): https://codereview.chromium.org/632203002/diff/20001/pkg/analyzer/lib/src/generated/ast.dart#newcode16051 pkg/analyzer/lib/src/generated/ast.dart:16051: if ...
6 years, 2 months ago (2014-10-07 16:30:56 UTC) #7
scheglov
6 years, 2 months ago (2014-10-07 18:11:09 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/632203002/diff/20001/pkg/analyzer/lib/src/gen...
File pkg/analyzer/lib/src/generated/ast.dart (right):

https://codereview.chromium.org/632203002/diff/20001/pkg/analyzer/lib/src/gen...
pkg/analyzer/lib/src/generated/ast.dart:16051: if (lexeme.length < 6) {
On 2014/10/07 16:30:55, Paul Berry wrote:
> Change this to "if (lexeme.length < 3)".  Otherwise we won't correctly
identify
> incomplete multiline strings.

Pushed this change into another analyzer CL:
https://codereview.chromium.org/637003002

Powered by Google App Engine
This is Rietveld 408576698