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

Unified Diff: pkg/analyzer/lib/src/dart/error/syntactic_errors.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/analyzer/lib/src/dart/error/syntactic_errors.dart
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index 1424c62a2ecffc837ae04d1b6cda368002629bce..5e5e176da4cf01afa6cb29eedb9b76e82c35ec73 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -744,6 +744,13 @@ class ParserErrorCode extends ErrorCode {
"loaded through native extensions.",
"Try removing the word 'native'.");
+ static const ParserErrorCode NATIVE_CLAUSE_SHOULD_BE_ANNOTATION =
+ const ParserErrorCode(
+ 'NATIVE_CLAUSE_SHOULD_BE_ANNOTATION',
+ "Native clause in this form is deprecated.",
+ "Try removing this native clause and adding @native()"
+ " or @native('some-text-here') before the declaration.");
ahe 2017/08/21 12:04:10 'some-text-here' -> 'native-name'
danrubel 2017/08/22 01:35:27 Good suggestion. Fixed here and in messages.yaml.
+
static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = const ParserErrorCode(
'NON_CONSTRUCTOR_FACTORY',
"Only a constructor can be declared to be a factory.",

Powered by Google App Engine
This is Rietveld 408576698