| OLD | NEW |
| 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( | 453 static const ParserErrorCode INVALID_CONSTRUCTOR_NAME = const ParserErrorCode( |
| 454 'INVALID_CONSTRUCTOR_NAME', | 454 'INVALID_CONSTRUCTOR_NAME', |
| 455 "The keyword '{0}' cannot be used to name a constructor.", | 455 "The keyword '{0}' cannot be used to name a constructor.", |
| 456 "Try giving the constructor a different name."); | 456 "Try giving the constructor a different name."); |
| 457 | 457 |
| 458 static const ParserErrorCode INVALID_GENERIC_FUNCTION_TYPE = |
| 459 const ParserErrorCode( |
| 460 'INVALID_GENERIC_FUNCTION_TYPE', |
| 461 "Invalid generic function type.", |
| 462 "Try using a generic function type (returnType 'Function(' parameters
')')."); |
| 463 |
| 458 static const ParserErrorCode INVALID_HEX_ESCAPE = const ParserErrorCode( | 464 static const ParserErrorCode INVALID_HEX_ESCAPE = const ParserErrorCode( |
| 459 'INVALID_HEX_ESCAPE', | 465 'INVALID_HEX_ESCAPE', |
| 460 "An escape sequence starting with '\\x' must be followed by 2 hexidecimal
digits."); | 466 "An escape sequence starting with '\\x' must be followed by 2 hexidecimal
digits."); |
| 461 | 467 |
| 462 static const ParserErrorCode INVALID_LITERAL_IN_CONFIGURATION = | 468 static const ParserErrorCode INVALID_LITERAL_IN_CONFIGURATION = |
| 463 const ParserErrorCode( | 469 const ParserErrorCode( |
| 464 'INVALID_LITERAL_IN_CONFIGURATION', | 470 'INVALID_LITERAL_IN_CONFIGURATION', |
| 465 "The literal in a configuration can't contain interpolation.", | 471 "The literal in a configuration can't contain interpolation.", |
| 466 "Try removing the interpolation expressions."); | 472 "Try removing the interpolation expressions."); |
| 467 | 473 |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 */ | 997 */ |
| 992 const ParserErrorCode(String name, String message, [String correction]) | 998 const ParserErrorCode(String name, String message, [String correction]) |
| 993 : super(name, message, correction); | 999 : super(name, message, correction); |
| 994 | 1000 |
| 995 @override | 1001 @override |
| 996 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; | 1002 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; |
| 997 | 1003 |
| 998 @override | 1004 @override |
| 999 ErrorType get type => ErrorType.SYNTACTIC_ERROR; | 1005 ErrorType get type => ErrorType.SYNTACTIC_ERROR; |
| 1000 } | 1006 } |
| OLD | NEW |