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

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

Issue 2707663002: Implement AstBuilder support for library, part, and part-of declarations. (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
Index: pkg/front_end/lib/src/fasta/parser/listener.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 1acd2b8d135ac40211a0621a7a4f07805dd65b45..897a754608819c9a83e200cb0d84845179b09326 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -405,6 +405,8 @@ class Listener {
void beginLibraryName(Token token) {}
+ /// Handle the end of a library directive. Substructures:
+ /// - Library name (a qualified identifier)
void endLibraryName(Token libraryKeyword, Token semicolon) {
logEvent("LibraryName");
}
@@ -465,12 +467,17 @@ class Listener {
void beginPart(Token token) {}
+ /// Handle the end of a part directive. Substructures:
+ /// - metadata
+ /// - uri
void endPart(Token partKeyword, Token semicolon) {
logEvent("Part");
}
void beginPartOf(Token token) {}
+ /// Handle the end of a "part of" directive. Substructures:
+ /// - Library name (a qualified identifier)
ahe 2017/02/20 09:59:40 There can also be metadata here.
Paul Berry 2017/02/20 14:48:32 Whoops, thank you. Will fix in a follow-up CL.
void endPartOf(Token partKeyword, Token semicolon) {
logEvent("PartOf");
}
@@ -765,6 +772,11 @@ class Listener {
logEvent("ParenthesizedExpression");
}
+ /// Handle a construct of the form "identifier.identifier" occurring in a part
+ /// of the grammar where expressions in general are not allowed.
+ /// Substructures:
+ /// - Qualified identifier (before the period)
+ /// - Identifier (after the period)
void handleQualified(Token period) {
logEvent("Qualified");
}

Powered by Google App Engine
This is Rietveld 408576698