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

Unified Diff: pkg/front_end/lib/src/fasta/parser/parser.dart

Issue 3004683002: report abstract as extraneous modifier (Closed)
Patch Set: 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_fasta_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/parser/parser.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index d3bcceae05a50ab1bdd7ec486e4fa479814c7fa3..2dfaf912f8e08f9338935051cbce9fb982747be9 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -2059,7 +2059,6 @@ class Parser {
}
int order = modifierOrder(token);
if (order < 3) {
- // `abstract` isn't parsed with this method.
if (order > currentOrder) {
currentOrder = order;
if (optional("var", token)) {
@@ -2149,6 +2148,11 @@ class Parser {
token, fasta.templateExtraneousModifier);
token = token.next;
}
+ } else if (order == 3) {
+ // abstract
ahe 2017/08/28 11:14:08 Consider this instead of the comment: assert(opti
danrubel 2017/08/29 14:58:47 Good idea. Done.
+ reportRecoverableErrorWithToken(
+ token, fasta.templateExtraneousModifier);
ahe 2017/08/28 11:14:08 Should this be a new error code so it's easier to
danrubel 2017/08/29 14:58:47 I need to create a separate error code to distingu
+ token = token.next;
} else {
break;
}
« no previous file with comments | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698