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

Side by Side Diff: pkg/analyzer/lib/src/dart/error/syntactic_errors.dart

Issue 2999303002: map fasta error codes to analyzer (Closed)
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/fasta/ast_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * The errors produced during syntactic analysis (scanning and parsing). 6 * The errors produced during syntactic analysis (scanning and parsing).
7 */ 7 */
8 library analyzer.src.dart.error.syntactic_errors; 8 library analyzer.src.dart.error.syntactic_errors;
9 9
10 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 'EXTERNAL_SETTER_WITH_BODY', 323 'EXTERNAL_SETTER_WITH_BODY',
324 "External setters can't have a body.", 324 "External setters can't have a body.",
325 "Try removing the body of the setter, or " 325 "Try removing the body of the setter, or "
326 "removing the keyword 'external'."); 326 "removing the keyword 'external'.");
327 327
328 static const ParserErrorCode EXTERNAL_TYPEDEF = const ParserErrorCode( 328 static const ParserErrorCode EXTERNAL_TYPEDEF = const ParserErrorCode(
329 'EXTERNAL_TYPEDEF', 329 'EXTERNAL_TYPEDEF',
330 "Typedefs can't be declared to be 'external'.", 330 "Typedefs can't be declared to be 'external'.",
331 "Try removing the keyword 'external'."); 331 "Try removing the keyword 'external'.");
332 332
333 static const ParserErrorCode EXTRANEOUS_MODIFIER = const ParserErrorCode(
334 'EXTRANEOUS_MODIFIER',
335 "Can't have modifier '{0}' here.",
336 "Try removing '{0}'.");
337
333 static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = 338 static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION =
334 const ParserErrorCode( 339 const ParserErrorCode(
335 'FACTORY_TOP_LEVEL_DECLARATION', 340 'FACTORY_TOP_LEVEL_DECLARATION',
336 "Top-level declarations can't be declared to be 'factory'.", 341 "Top-level declarations can't be declared to be 'factory'.",
337 "Try removing the keyword 'factory'."); 342 "Try removing the keyword 'factory'.");
338 343
339 static const ParserErrorCode FACTORY_WITH_INITIALIZERS = const ParserErrorCode ( 344 static const ParserErrorCode FACTORY_WITH_INITIALIZERS = const ParserErrorCode (
340 'FACTORY_WITH_INITIALIZERS', 345 'FACTORY_WITH_INITIALIZERS',
341 "A 'factory' constructor can't have initializers.", 346 "A 'factory' constructor can't have initializers.",
342 "Try removing the 'factory' keyword to make this a generative constructor, or " 347 "Try removing the 'factory' keyword to make this a generative constructor, or "
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 */ 1002 */
998 const ParserErrorCode(String name, String message, [String correction]) 1003 const ParserErrorCode(String name, String message, [String correction])
999 : super(name, message, correction); 1004 : super(name, message, correction);
1000 1005
1001 @override 1006 @override
1002 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; 1007 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
1003 1008
1004 @override 1009 @override
1005 ErrorType get type => ErrorType.SYNTACTIC_ERROR; 1010 ErrorType get type => ErrorType.SYNTACTIC_ERROR;
1006 } 1011 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/fasta/ast_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698