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

Unified Diff: pkg/analyzer/tool/summary/mini_ast.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/test/generated/parser_test.dart ('k') | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/tool/summary/mini_ast.dart
diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart
index 5fe84ce286d17c873d861688aba1f47007371789..6a15270be95b68e2de7ee51bbf20cd2bbb88c9e2 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -187,12 +187,20 @@ class MiniAstBuilder extends StackListener {
push(popList(memberCount));
}
+ @override
+ void handleNativeClause(Token nativeToken, bool hasName) {
+ if (hasName) {
+ pop(); // Pop the native clause which in this case is a StringLiteral.
+ }
+ }
+
void endClassDeclaration(
int interfacesCount,
Token beginToken,
Token classKeyword,
Token extendsKeyword,
Token implementsKeyword,
+ Token nativeToken,
Token endToken) {
debugEvent("ClassDeclaration");
List<ClassMember> members = pop();
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698