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

Unified Diff: pkg/compiler/lib/src/parser/node_listener.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/compiler/lib/src/parser/node_listener.dart
diff --git a/pkg/compiler/lib/src/parser/node_listener.dart b/pkg/compiler/lib/src/parser/node_listener.dart
index 9d4fe2577d7449cc28ee524f850cd4179a92be02..b8ca87cff53eaca2e11007d599f39cf5b829b8be 100644
--- a/pkg/compiler/lib/src/parser/node_listener.dart
+++ b/pkg/compiler/lib/src/parser/node_listener.dart
@@ -108,8 +108,12 @@ class NodeListener extends ElementListener {
Token classKeyword,
Token extendsKeyword,
Token implementsKeyword,
+ Token nativeToken,
Token endToken) {
NodeList body = popNode();
+ if (nativeToken?.next?.type == TokenType.STRING) {
ahe 2017/08/21 12:04:10 Ditto.
+ popNode(); // native clause - LiteralString
+ }
NodeList interfaces =
makeNodeList(interfacesCount, implementsKeyword, null, ",");
Node supertype = popNode();

Powered by Google App Engine
This is Rietveld 408576698