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

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

Issue 3004683002: report abstract as extraneous modifier (Closed)
Patch Set: address comments 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..725cb2871e2cb57cb66975e27a5d62cb7e24e1e2 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) {
+ assert(optional('abstract', token));
+ reportRecoverableErrorWithToken(
+ token, fasta.templateExtraneousModifier);
+ 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