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

Unified Diff: pkg/front_end/lib/src/fasta/source/outline_builder.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/front_end/lib/src/fasta/source/outline_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 680c6022738c84db845bf54dcc38de1898d5c5f3..177891eb66e2785cad5441acd4067bbaf9ba88b5 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -6,7 +6,7 @@ library fasta.outline_builder;
import 'package:kernel/ast.dart' show ProcedureKind;
-import '../../scanner/token.dart' show Token;
+import '../../scanner/token.dart' show Token, TokenType;
import '../builder/builder.dart';
@@ -299,9 +299,15 @@ class OutlineBuilder extends UnhandledListener {
Token classKeyword,
Token extendsKeyword,
Token implementsKeyword,
+ Token nativeToken,
Token endToken) {
debugEvent("endClassDeclaration");
String documentationComment = _getDocumentationComment(beginToken);
+ if (nativeToken?.next?.type == TokenType.STRING) {
ahe 2017/08/21 12:04:10 Same comment as ast_builder.dart.
danrubel 2017/08/22 01:35:28 Fixed as discussed previously.
+ // pop native clause - literal string
ahe 2017/08/21 12:04:10 A sentence should start with an uppercase letter a
+ pop(); // char offset
+ pop(); // string
+ }
List<TypeBuilder> interfaces = popList(interfacesCount);
TypeBuilder supertype = pop();
List<TypeVariableBuilder> typeVariables = pop();

Powered by Google App Engine
This is Rietveld 408576698