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

Unified Diff: pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart

Issue 2722283002: Parse 'x.y' as PrefixedIdentifier, not PropertyAccess with Fasta. (Closed)
Patch Set: Created 3 years, 10 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 | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart b/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
index 9947775894f4b28d423fb7153acb2d7a27d0db4b..bcf7a20a625e67d2f40d3c1ee229cd42c2ae8c72 100644
--- a/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
+++ b/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
@@ -254,8 +254,13 @@ class AstBuilder extends ScopeListener {
Expression identifierOrInvoke = pop();
Expression receiver = pop();
if (identifierOrInvoke is SimpleIdentifier) {
- push(ast.propertyAccess(
- receiver, toAnalyzerToken(token), identifierOrInvoke));
+ if (receiver is SimpleIdentifier && identical('.', token.stringValue)) {
+ push(ast.prefixedIdentifier(
+ receiver, toAnalyzerToken(token), identifierOrInvoke));
+ } else {
+ push(ast.propertyAccess(
+ receiver, toAnalyzerToken(token), identifierOrInvoke));
+ }
} else if (identifierOrInvoke is MethodInvocation) {
assert(identifierOrInvoke.target == null);
identifierOrInvoke
« no previous file with comments | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698