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

Unified Diff: pkg/analyzer/lib/dart/ast/ast.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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | pkg/analyzer/lib/src/generated/parser.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/dart/ast/ast.dart
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index e53a2048d61dbdc961ea5096523a4550894a5dd1..ebe80aedaa95997a3b4360482a0b71f48328dce9 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -6704,7 +6704,10 @@ abstract class SimpleIdentifier extends Identifier {
/**
* Initialize a newly created identifier.
*/
- factory SimpleIdentifier(Token token) = SimpleIdentifierImpl;
+ factory SimpleIdentifier(Token token, {bool isDeclaration: false}) {
+ if (isDeclaration) return new DeclaredSimpleIdentifier(token);
Brian Wilkerson 2016/03/25 15:37:31 nit: block
Bob Nystrom 2016/03/28 16:09:16 Haha, fixed. I swear one day I will remember to no
+ return new SimpleIdentifierImpl(token);
+ }
/**
* Return the auxiliary elements associated with this identifier, or `null` if
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | pkg/analyzer/lib/src/generated/parser.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698