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

Unified Diff: pkg/analyzer/lib/src/generated/scanner.dart

Issue 1660873003: Clone and link all tokens in AstCloner. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/generated/scanner.dart
diff --git a/pkg/analyzer/lib/src/generated/scanner.dart b/pkg/analyzer/lib/src/generated/scanner.dart
index 49ea3ba89611bf51ea62b50d7cb741797a4a2353..3fc2113fabc4e0ee35d102ff8b5142224e608075 100644
--- a/pkg/analyzer/lib/src/generated/scanner.dart
+++ b/pkg/analyzer/lib/src/generated/scanner.dart
@@ -265,7 +265,12 @@ class DocumentationCommentToken extends CommentToken {
: super(type, value, offset);
@override
- CommentToken copy() => new DocumentationCommentToken(type, _value, offset);
+ CommentToken copy() {
+ DocumentationCommentToken copy =
+ new DocumentationCommentToken(type, _value, offset);
+ references.forEach((ref) => copy.references.add(ref.copy()));
+ return copy;
+ }
}
/**
@@ -2580,7 +2585,8 @@ class TokenType {
* operators can have an effect because evaluation of the right-hand operand
* is conditional.
*/
- bool get isAssociativeOperator => this == AMPERSAND ||
+ bool get isAssociativeOperator =>
+ this == AMPERSAND ||
this == AMPERSAND_AMPERSAND ||
this == BAR ||
this == BAR_BAR ||
@@ -2608,7 +2614,8 @@ class TokenType {
/**
* Return `true` if this token type represents an operator.
*/
- bool get isOperator => _tokenClass != TokenClass.NO_CLASS &&
+ bool get isOperator =>
+ _tokenClass != TokenClass.NO_CLASS &&
this != OPEN_PAREN &&
this != OPEN_SQUARE_BRACKET &&
this != PERIOD;
@@ -2640,7 +2647,8 @@ class TokenType {
* Return `true` if this token type represents an operator that can be defined
* by users.
*/
- bool get isUserDefinableOperator => identical(lexeme, "==") ||
+ bool get isUserDefinableOperator =>
+ identical(lexeme, "==") ||
identical(lexeme, "~") ||
identical(lexeme, "[]") ||
identical(lexeme, "[]=") ||
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/utilities.dart ('k') | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698