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

Unified Diff: pkg/front_end/lib/src/fasta/parser/parser.dart

Issue 2747173002: Handle 'part of' declarations with URI correctly in Fasta. (Closed)
Patch Set: Address comments. Created 3 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/front_end/lib/src/fasta/parser/parser.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 275c3ed762e596c8bcba89250244c25b719282ee..d86c385bb685670587f37f5ba9e566127d014155 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -348,7 +348,8 @@ class Parser {
assert(optional('of', token.next));
Token partKeyword = token;
token = token.next.next;
- if (token.isIdentifier()) {
+ bool hasName = token.isIdentifier();
+ if (hasName) {
token = parseQualified(token, IdentifierContext.partName,
IdentifierContext.partNameContinuation);
} else {
@@ -356,7 +357,7 @@ class Parser {
}
Token semicolon = token;
token = expect(';', token);
- listener.endPartOf(partKeyword, semicolon);
+ listener.endPartOf(partKeyword, semicolon, hasName);
return token;
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/listener.dart ('k') | pkg/front_end/lib/src/fasta/source/diet_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698