| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |