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

Unified Diff: pkg/analyzer/lib/src/dart/ast/utilities.dart

Issue 1833573006: Distinguish SimpleIdentifier uses and declarations at parse time. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/dart/ast/utilities.dart
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index 3628346d3d8b61cf7ac548fc3436349f903effef..edd019603f32021ddf2f7214308be9b25f2a1b21 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -778,7 +778,8 @@ class AstCloner implements AstVisitor<AstNode> {
@override
SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) =>
- new SimpleIdentifier(cloneToken(node.token));
+ new SimpleIdentifier(cloneToken(node.token),
+ isDeclaration: node.inDeclarationContext());
@override
SimpleStringLiteral visitSimpleStringLiteral(SimpleStringLiteral node) =>
@@ -3433,7 +3434,8 @@ class IncrementalAstCloner implements AstVisitor<AstNode> {
// documentation comments for the parser.
mappedToken = node.token;
}
- SimpleIdentifier copy = new SimpleIdentifier(mappedToken);
+ SimpleIdentifier copy = new SimpleIdentifier(mappedToken,
+ isDeclaration: node.inDeclarationContext());
copy.auxiliaryElements = node.auxiliaryElements;
copy.propagatedElement = node.propagatedElement;
copy.propagatedType = node.propagatedType;

Powered by Google App Engine
This is Rietveld 408576698