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

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

Issue 2996163002: support class native clause (Closed)
Patch Set: update DietListener and test Created 3 years, 4 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/front_end/lib/src/fasta/source/directive_listener.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 680c6022738c84db845bf54dcc38de1898d5c5f3..a0a234256e5c5c164b93008addd72e77f696c285 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -292,6 +292,15 @@ class OutlineBuilder extends UnhandledListener {
library.currentDeclaration.name = name.lexeme;
}
+ @override
+ void handleNativeClause(Token nativeToken, bool hasName) {
+ if (hasName) {
+ // Pop the native clause which in this case is a StringLiteral.
+ pop(); // Char offset.
+ pop(); // String.
+ }
+ }
+
@override
void endClassDeclaration(
int interfacesCount,
@@ -299,6 +308,7 @@ class OutlineBuilder extends UnhandledListener {
Token classKeyword,
Token extendsKeyword,
Token implementsKeyword,
+ Token nativeToken,
Token endToken) {
debugEvent("endClassDeclaration");
String documentationComment = _getDocumentationComment(beginToken);
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/directive_listener.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698