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

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: Brace body. 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') | no next file with comments »
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..9e5bca2277dd345ed29ab0dbc8a43235f0bac2d0 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -6704,7 +6704,12 @@ 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);
+ }
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698