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

Unified Diff: pkg/compiler/lib/src/parser/element_listener.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/analyzer/tool/summary/mini_ast.dart ('k') | pkg/compiler/lib/src/parser/node_listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/parser/element_listener.dart
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart
index 964d1dba7fb912c45d0e0e3afe7bdc8ad945fa67..0366a37503b83cc822a441a1b0a77efc1377befb 100644
--- a/pkg/compiler/lib/src/parser/element_listener.dart
+++ b/pkg/compiler/lib/src/parser/element_listener.dart
@@ -278,6 +278,13 @@ class ElementListener extends Listener {
}
}
+ @override
+ void handleNativeClause(Token nativeToken, bool hasName) {
+ if (hasName) {
+ popNode(); // Pop the native clause which in this case is a StringLiteral.
+ }
+ }
+
@override
void endClassDeclaration(
int interfacesCount,
@@ -285,6 +292,7 @@ class ElementListener extends Listener {
Token classKeyword,
Token extendsKeyword,
Token implementsKeyword,
+ Token nativeToken,
Token endToken) {
makeNodeList(interfacesCount, implementsKeyword, null, ","); // interfaces
popNode(); // superType
« no previous file with comments | « pkg/analyzer/tool/summary/mini_ast.dart ('k') | pkg/compiler/lib/src/parser/node_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698