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

Unified Diff: pkg/compiler/lib/src/parser/element_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/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..e755c3c626d7b904a6bdff4fac2621ef3126fc2a 100644
--- a/pkg/compiler/lib/src/parser/element_listener.dart
+++ b/pkg/compiler/lib/src/parser/element_listener.dart
@@ -285,7 +285,11 @@ class ElementListener extends Listener {
Token classKeyword,
Token extendsKeyword,
Token implementsKeyword,
+ Token nativeToken,
Token endToken) {
+ if (nativeToken?.next?.type == TokenType.STRING) {
+ popNode(); // native clause - LiteralString
ahe 2017/08/21 12:04:10 Same comment as in ast_builder.dart: I would expe
danrubel 2017/08/22 01:35:28 Yup. Fixed as described earlier.
+ }
makeNodeList(interfacesCount, implementsKeyword, null, ","); // interfaces
popNode(); // superType
popNode(); // typeParameters

Powered by Google App Engine
This is Rietveld 408576698