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

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

Issue 2700343003: Recover better from illegally named constructors (issue 28807) (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | pkg/analyzer/lib/src/generated/parser.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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 */ 443 */
444 static const ParserErrorCode INVALID_CODE_POINT = const ParserErrorCode( 444 static const ParserErrorCode INVALID_CODE_POINT = const ParserErrorCode(
445 'INVALID_CODE_POINT', 445 'INVALID_CODE_POINT',
446 "The escape sequence '{0}' isn't a valid code point."); 446 "The escape sequence '{0}' isn't a valid code point.");
447 447
448 static const ParserErrorCode INVALID_COMMENT_REFERENCE = const ParserErrorCode ( 448 static const ParserErrorCode INVALID_COMMENT_REFERENCE = const ParserErrorCode (
449 'INVALID_COMMENT_REFERENCE', 449 'INVALID_COMMENT_REFERENCE',
450 "Comment references should contain a possibly prefixed identifier and " 450 "Comment references should contain a possibly prefixed identifier and "
451 "can start with 'new', but shouldn't contain anything else."); 451 "can start with 'new', but shouldn't contain anything else.");
452 452
453 static const ParserErrorCode INVALID_CONSTRUCTOR_NAME = const ParserErrorCode(
454 'INVALID_CONSTRUCTOR_NAME',
455 "The keyword word '{0}' cannot be used to name a constructor.",
scheglov 2017/02/18 17:37:40 Do we need to repeat "word"?
Brian Wilkerson 2017/02/18 17:48:01 Removed, thanks!
456 "Try giving the constructor a different name.");
457
453 static const ParserErrorCode INVALID_HEX_ESCAPE = const ParserErrorCode( 458 static const ParserErrorCode INVALID_HEX_ESCAPE = const ParserErrorCode(
454 'INVALID_HEX_ESCAPE', 459 'INVALID_HEX_ESCAPE',
455 "An escape sequence starting with '\\x' must be followed by 2 hexidecimal digits."); 460 "An escape sequence starting with '\\x' must be followed by 2 hexidecimal digits.");
456 461
457 static const ParserErrorCode INVALID_LITERAL_IN_CONFIGURATION = 462 static const ParserErrorCode INVALID_LITERAL_IN_CONFIGURATION =
458 const ParserErrorCode( 463 const ParserErrorCode(
459 'INVALID_LITERAL_IN_CONFIGURATION', 464 'INVALID_LITERAL_IN_CONFIGURATION',
460 "The literal in a configuration can't contain interpolation.", 465 "The literal in a configuration can't contain interpolation.",
461 "Try removing the interpolation expressions."); 466 "Try removing the interpolation expressions.");
462 467
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 */ 991 */
987 const ParserErrorCode(String name, String message, [String correction]) 992 const ParserErrorCode(String name, String message, [String correction])
988 : super(name, message, correction); 993 : super(name, message, correction);
989 994
990 @override 995 @override
991 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; 996 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
992 997
993 @override 998 @override
994 ErrorType get type => ErrorType.SYNTACTIC_ERROR; 999 ErrorType get type => ErrorType.SYNTACTIC_ERROR;
995 } 1000 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698