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

Unified Diff: pkg/compiler/lib/src/parser/parser.dart

Issue 2640853005: Make Analyzer, VM and dart2js accept URI strings as part-of library identifier. (Closed)
Patch Set: Add tests, enable flag by default in analyzer. Created 3 years, 11 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/compiler/lib/src/parser/parser.dart
diff --git a/pkg/compiler/lib/src/parser/parser.dart b/pkg/compiler/lib/src/parser/parser.dart
index 0ef9cb8373d292e82d3f55ef70d7bd8d86addb3b..65d84ef75350b6d8bf125427ab6f0b2b296f7a64 100644
--- a/pkg/compiler/lib/src/parser/parser.dart
+++ b/pkg/compiler/lib/src/parser/parser.dart
@@ -321,7 +321,12 @@ class Parser {
assert(optional('part', token));
assert(optional('of', token.next));
Token partKeyword = token;
- token = parseQualified(token.next.next);
+ token = token.next.next;
+ if (token.isIdentifier()) {
+ token = parseQualified(token);
+ } else {
+ token = parseLiteralStringOrRecoverExpression(token);
+ }
Token semicolon = token;
token = expect(';', token);
listener.endPartOf(partKeyword, semicolon);

Powered by Google App Engine
This is Rietveld 408576698