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

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

Issue 3007033002: report const class as a more specific error code (Closed)
Patch Set: Created 3 years, 3 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/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | pkg/front_end/messages.yaml » ('j') | 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 69bf837c23c75ef64a0bdec849ce2daca7158268..f1b75c63adddaa2913269020d67c07f93a1dcae8 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -286,12 +286,10 @@ class Parser {
optional('class', token) &&
abstractToken == null) {
abstractToken = modifierToken;
+ } else if (optional('const', modifierToken) &&
+ optional('class', token)) {
+ reportRecoverableError(modifierToken, fasta.messageConstClass);
} else {
- // TODO(danrubel): Report more specific recoverable error message
- // for `const class` to better help the user.
- // See ParserErrorCode CONST_CLASS
-
- // Report an error for each extraneous modifier
reportRecoverableErrorWithToken(
modifierToken, fasta.templateExtraneousModifier);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698