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

Unified Diff: pkg/analyzer/tool/summary/mini_ast.dart

Issue 2996163002: support class native clause (Closed)
Patch Set: add new fasta native clause error code 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
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..72e340a272b2ad2d653f003708beaab9de0ccca9 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -193,9 +193,13 @@ class MiniAstBuilder extends StackListener {
Token classKeyword,
Token extendsKeyword,
Token implementsKeyword,
+ Token nativeToken,
Token endToken) {
debugEvent("ClassDeclaration");
List<ClassMember> members = pop();
+ if (nativeToken?.next?.type == TokenType.STRING) {
+ pop(); // native clause - StringLiteral
+ }
TypeName superclass = pop();
pop(); // Type variables
String name = pop();

Powered by Google App Engine
This is Rietveld 408576698