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

Unified Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2747173002: Handle 'part of' declarations with URI correctly in Fasta. (Closed)
Patch Set: dartfmt. 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/source/outline_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 15a24a74dbcfbb88fdd7f5bd612c226187aa11cd..2cabd7831518da345cd09b7e59a99851a8ffe50c 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -576,11 +576,12 @@ class OutlineBuilder extends UnhandledListener {
}
@override
- void endPartOf(Token partKeyword, Token semicolon) {
+ void endPartOf(Token partKeyword, Token semicolon, bool hasName) {
debugEvent("endPartOf");
- String name = pop();
+ String name = hasName ? pop() : null;
Paul Berry 2017/03/14 14:48:23 I see what you're doing here, but IMHO it's a litt
ahe 2017/03/15 14:05:36 Honestly, I wasn't super happy with it either :-)
+ String uri = hasName ? null : pop();
List<MetadataBuilder> metadata = pop();
- library.addPartOf(metadata, name);
+ library.addPartOf(metadata, name, uri);
}
@override
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_listener.dart ('k') | pkg/front_end/lib/src/fasta/source/source_library_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698