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

Side by Side Diff: pkg/analyzer/lib/src/generated/parser.dart

Issue 214253002: Translate Java enums to Dart constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.parser; 8 library engine.parser;
9 9
10 import 'java_core.dart'; 10 import 'java_core.dart';
11 import 'java_engine.dart'; 11 import 'java_engine.dart';
12 import 'instrumentation.dart'; 12 import 'instrumentation.dart';
13 import 'error.dart'; 13 import 'error.dart';
14 import 'source.dart'; 14 import 'source.dart';
15 import 'scanner.dart'; 15 import 'scanner.dart';
16 import 'ast.dart'; 16 import 'ast.dart';
17 import 'utilities_dart.dart'; 17 import 'utilities_dart.dart';
18 import 'engine.dart' show AnalysisEngine; 18 import 'engine.dart' show AnalysisEngine;
19 import 'utilities_collection.dart' show TokenMap; 19 import 'utilities_collection.dart' show TokenMap;
20 20
21 /** 21 /**
22 * Instances of the class `CommentAndMetadata` implement a simple data-holder fo r a method 22 * Instances of the class `CommentAndMetadata` implement a simple data-holder fo r a method
23 * that needs to return multiple values. 23 * that needs to return multiple values.
24 */ 24 */
25 class CommentAndMetadata { 25 class CommentAndMetadata {
26 /** 26 /**
27 * The documentation comment that was parsed, or `null` if none was given. 27 * The documentation comment that was parsed, or `null` if none was given.
28 */ 28 */
29 Comment comment; 29 final Comment comment;
30 30
31 /** 31 /**
32 * The metadata that was parsed. 32 * The metadata that was parsed.
33 */ 33 */
34 List<Annotation> metadata; 34 final List<Annotation> metadata;
35 35
36 /** 36 /**
37 * Initialize a newly created holder with the given data. 37 * Initialize a newly created holder with the given data.
38 * 38 *
39 * @param comment the documentation comment that was parsed 39 * @param comment the documentation comment that was parsed
40 * @param metadata the metadata that was parsed 40 * @param metadata the metadata that was parsed
41 */ 41 */
42 CommentAndMetadata(Comment comment, List<Annotation> metadata) { 42 CommentAndMetadata(this.comment, this.metadata);
43 this.comment = comment;
44 this.metadata = metadata;
45 }
46 } 43 }
47 44
48 /** 45 /**
49 * Instances of the class `FinalConstVarOrType` implement a simple data-holder f or a method 46 * Instances of the class `FinalConstVarOrType` implement a simple data-holder f or a method
50 * that needs to return multiple values. 47 * that needs to return multiple values.
51 */ 48 */
52 class FinalConstVarOrType { 49 class FinalConstVarOrType {
53 /** 50 /**
54 * The 'final', 'const' or 'var' keyword, or `null` if none was given. 51 * The 'final', 'const' or 'var' keyword, or `null` if none was given.
55 */ 52 */
56 Token keyword; 53 final Token keyword;
57 54
58 /** 55 /**
59 * The type, of `null` if no type was specified. 56 * The type, of `null` if no type was specified.
60 */ 57 */
61 TypeName type; 58 final TypeName type;
62 59
63 /** 60 /**
64 * Initialize a newly created holder with the given data. 61 * Initialize a newly created holder with the given data.
65 * 62 *
66 * @param keyword the 'final', 'const' or 'var' keyword 63 * @param keyword the 'final', 'const' or 'var' keyword
67 * @param type the type 64 * @param type the type
68 */ 65 */
69 FinalConstVarOrType(Token keyword, TypeName type) { 66 FinalConstVarOrType(this.keyword, this.type);
70 this.keyword = keyword;
71 this.type = type;
72 }
73 } 67 }
74 68
75 /** 69 /**
76 * Instances of the class `Modifiers` implement a simple data-holder for a metho d that needs 70 * Instances of the class `Modifiers` implement a simple data-holder for a metho d that needs
77 * to return multiple values. 71 * to return multiple values.
78 */ 72 */
79 class Modifiers { 73 class Modifiers {
80 /** 74 /**
81 * The token representing the keyword 'abstract', or `null` if the keyword was not found. 75 * The token representing the keyword 'abstract', or `null` if the keyword was not found.
82 */ 76 */
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 * Instances of the class `IncrementalParseDispatcher` implement a dispatcher th at will invoke 144 * Instances of the class `IncrementalParseDispatcher` implement a dispatcher th at will invoke
151 * the right parse method when re-parsing a specified child of the visited node. All of the methods 145 * the right parse method when re-parsing a specified child of the visited node. All of the methods
152 * in this class assume that the parser is positioned to parse the replacement f or the node. All of 146 * in this class assume that the parser is positioned to parse the replacement f or the node. All of
153 * the methods will throw an [IncrementalParseException] if the node could not b e parsed for 147 * the methods will throw an [IncrementalParseException] if the node could not b e parsed for
154 * some reason. 148 * some reason.
155 */ 149 */
156 class IncrementalParseDispatcher implements AstVisitor<AstNode> { 150 class IncrementalParseDispatcher implements AstVisitor<AstNode> {
157 /** 151 /**
158 * The parser used to parse the replacement for the node. 152 * The parser used to parse the replacement for the node.
159 */ 153 */
160 Parser _parser; 154 final Parser _parser;
161 155
162 /** 156 /**
163 * The node that is to be replaced. 157 * The node that is to be replaced.
164 */ 158 */
165 AstNode _oldNode; 159 final AstNode _oldNode;
166 160
167 /** 161 /**
168 * Initialize a newly created dispatcher to parse a single node that will repl ace the given node. 162 * Initialize a newly created dispatcher to parse a single node that will repl ace the given node.
169 * 163 *
170 * @param parser the parser used to parse the replacement for the node 164 * @param parser the parser used to parse the replacement for the node
171 * @param oldNode the node that is to be replaced 165 * @param oldNode the node that is to be replaced
172 */ 166 */
173 IncrementalParseDispatcher(Parser parser, AstNode oldNode) { 167 IncrementalParseDispatcher(this._parser, this._oldNode);
174 this._parser = parser;
175 this._oldNode = oldNode;
176 }
177 168
178 @override 169 @override
179 AstNode visitAdjacentStrings(AdjacentStrings node) { 170 AstNode visitAdjacentStrings(AdjacentStrings node) {
180 if (node.strings.contains(_oldNode)) { 171 if (node.strings.contains(_oldNode)) {
181 return _parser.parseStringLiteral(); 172 return _parser.parseStringLiteral();
182 } 173 }
183 return _notAChild(node); 174 return _notAChild(node);
184 } 175 }
185 176
186 @override 177 @override
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 } 1233 }
1243 1234
1244 /** 1235 /**
1245 * Instances of the class `IncrementalParser` re-parse a single AST structure wi thin a larger 1236 * Instances of the class `IncrementalParser` re-parse a single AST structure wi thin a larger
1246 * AST structure. 1237 * AST structure.
1247 */ 1238 */
1248 class IncrementalParser { 1239 class IncrementalParser {
1249 /** 1240 /**
1250 * The source being parsed. 1241 * The source being parsed.
1251 */ 1242 */
1252 Source _source; 1243 final Source _source;
1253 1244
1254 /** 1245 /**
1255 * A map from old tokens to new tokens used during the cloning process. 1246 * A map from old tokens to new tokens used during the cloning process.
1256 */ 1247 */
1257 TokenMap _tokenMap; 1248 final TokenMap _tokenMap;
1258 1249
1259 /** 1250 /**
1260 * The error listener that will be informed of any errors that are found durin g the parse. 1251 * The error listener that will be informed of any errors that are found durin g the parse.
1261 */ 1252 */
1262 AnalysisErrorListener _errorListener; 1253 final AnalysisErrorListener _errorListener;
1263 1254
1264 /** 1255 /**
1265 * The node in the AST structure that contains the revised content. 1256 * The node in the AST structure that contains the revised content.
1266 */ 1257 */
1267 AstNode _updatedNode; 1258 AstNode _updatedNode;
1268 1259
1269 /** 1260 /**
1270 * Initialize a newly created incremental parser to parse a portion of the con tent of the given 1261 * Initialize a newly created incremental parser to parse a portion of the con tent of the given
1271 * source. 1262 * source.
1272 * 1263 *
1273 * @param source the source being parsed 1264 * @param source the source being parsed
1274 * @param tokenMap a map from old tokens to new tokens used during the cloning process 1265 * @param tokenMap a map from old tokens to new tokens used during the cloning process
1275 * @param errorListener the error listener that will be informed of any errors that are found 1266 * @param errorListener the error listener that will be informed of any errors that are found
1276 * during the parse 1267 * during the parse
1277 */ 1268 */
1278 IncrementalParser(Source source, TokenMap tokenMap, AnalysisErrorListener erro rListener) { 1269 IncrementalParser(this._source, this._tokenMap, this._errorListener);
1279 this._source = source;
1280 this._tokenMap = tokenMap;
1281 this._errorListener = errorListener;
1282 }
1283 1270
1284 /** 1271 /**
1285 * Return the node in the AST structure that contains the revised content. 1272 * Return the node in the AST structure that contains the revised content.
1286 * 1273 *
1287 * @return the updated node 1274 * @return the updated node
1288 */ 1275 */
1289 AstNode get updatedNode => _updatedNode; 1276 AstNode get updatedNode => _updatedNode;
1290 1277
1291 /** 1278 /**
1292 * Given a range of tokens that were re-scanned, re-parse the minimum number o f tokens to produce 1279 * Given a range of tokens that were re-scanned, re-parse the minimum number o f tokens to produce
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 InsufficientContextException.con2(Exception cause) : super.con2(cause); 1419 InsufficientContextException.con2(Exception cause) : super.con2(cause);
1433 } 1420 }
1434 1421
1435 /** 1422 /**
1436 * Instances of the class `Parser` are used to parse tokens into an AST structur e. 1423 * Instances of the class `Parser` are used to parse tokens into an AST structur e.
1437 */ 1424 */
1438 class Parser { 1425 class Parser {
1439 /** 1426 /**
1440 * The source being parsed. 1427 * The source being parsed.
1441 */ 1428 */
1442 Source _source; 1429 final Source _source;
1443 1430
1444 /** 1431 /**
1445 * The error listener that will be informed of any errors that are found durin g the parse. 1432 * The error listener that will be informed of any errors that are found durin g the parse.
1446 */ 1433 */
1447 AnalysisErrorListener _errorListener; 1434 final AnalysisErrorListener _errorListener;
1448 1435
1449 /** 1436 /**
1450 * An [errorListener] lock, if more than `0`, then errors are not reported. 1437 * An [errorListener] lock, if more than `0`, then errors are not reported.
1451 */ 1438 */
1452 int _errorListenerLock = 0; 1439 int _errorListenerLock = 0;
1453 1440
1454 /** 1441 /**
1455 * A flag indicating whether parser is to parse function bodies. 1442 * A flag indicating whether parser is to parse function bodies.
1456 */ 1443 */
1457 bool _parseFunctionBodies = true; 1444 bool _parseFunctionBodies = true;
(...skipping 23 matching lines...) Expand all
1481 1468
1482 static String _SHOW = "show"; 1469 static String _SHOW = "show";
1483 1470
1484 /** 1471 /**
1485 * Initialize a newly created parser. 1472 * Initialize a newly created parser.
1486 * 1473 *
1487 * @param source the source being parsed 1474 * @param source the source being parsed
1488 * @param errorListener the error listener that will be informed of any errors that are found 1475 * @param errorListener the error listener that will be informed of any errors that are found
1489 * during the parse 1476 * during the parse
1490 */ 1477 */
1491 Parser(Source source, AnalysisErrorListener errorListener) { 1478 Parser(this._source, this._errorListener);
1492 this._source = source;
1493 this._errorListener = errorListener;
1494 }
1495 1479
1496 /** 1480 /**
1497 * Parse a compilation unit, starting with the given token. 1481 * Parse a compilation unit, starting with the given token.
1498 * 1482 *
1499 * @param token the first token of the compilation unit 1483 * @param token the first token of the compilation unit
1500 * @return the compilation unit that was parsed 1484 * @return the compilation unit that was parsed
1501 */ 1485 */
1502 CompilationUnit parseCompilationUnit(Token token) { 1486 CompilationUnit parseCompilationUnit(Token token) {
1503 InstrumentationBuilder instrumentation = Instrumentation.builder2("dart.engi ne.Parser.parseCompilationUnit"); 1487 InstrumentationBuilder instrumentation = Instrumentation.builder2("dart.engi ne.Parser.parseCompilationUnit");
1504 try { 1488 try {
(...skipping 5839 matching lines...) Expand 10 before | Expand all | Expand 10 after
7344 int get length => 0; 7328 int get length => 0;
7345 } 7329 }
7346 7330
7347 /** 7331 /**
7348 * The enumeration `ParserErrorCode` defines the error codes used for errors det ected by the 7332 * The enumeration `ParserErrorCode` defines the error codes used for errors det ected by the
7349 * parser. The convention for this class is for the name of the error code to in dicate the problem 7333 * parser. The convention for this class is for the name of the error code to in dicate the problem
7350 * that caused the error to be generated and for the error message to explain wh at is wrong and, 7334 * that caused the error to be generated and for the error message to explain wh at is wrong and,
7351 * when appropriate, how the problem can be corrected. 7335 * when appropriate, how the problem can be corrected.
7352 */ 7336 */
7353 class ParserErrorCode extends Enum<ParserErrorCode> implements ErrorCode { 7337 class ParserErrorCode extends Enum<ParserErrorCode> implements ErrorCode {
7354 static final ParserErrorCode ABSTRACT_CLASS_MEMBER = new ParserErrorCode.con3( 'ABSTRACT_CLASS_MEMBER', 0, "Members of classes cannot be declared to be 'abstra ct'"); 7338 static const ParserErrorCode ABSTRACT_CLASS_MEMBER = const ParserErrorCode.con 3('ABSTRACT_CLASS_MEMBER', 0, "Members of classes cannot be declared to be 'abst ract'");
7355 7339
7356 static final ParserErrorCode ABSTRACT_STATIC_METHOD = new ParserErrorCode.con3 ('ABSTRACT_STATIC_METHOD', 1, "Static methods cannot be declared to be 'abstract '"); 7340 static const ParserErrorCode ABSTRACT_STATIC_METHOD = const ParserErrorCode.co n3('ABSTRACT_STATIC_METHOD', 1, "Static methods cannot be declared to be 'abstra ct'");
7357 7341
7358 static final ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = new ParserErrorCode .con3('ABSTRACT_TOP_LEVEL_FUNCTION', 2, "Top-level functions cannot be declared to be 'abstract'"); 7342 static const ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = const ParserErrorCo de.con3('ABSTRACT_TOP_LEVEL_FUNCTION', 2, "Top-level functions cannot be declare d to be 'abstract'");
7359 7343
7360 static final ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = new ParserErrorCode .con3('ABSTRACT_TOP_LEVEL_VARIABLE', 3, "Top-level variables cannot be declared to be 'abstract'"); 7344 static const ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = const ParserErrorCo de.con3('ABSTRACT_TOP_LEVEL_VARIABLE', 3, "Top-level variables cannot be declare d to be 'abstract'");
7361 7345
7362 static final ParserErrorCode ABSTRACT_TYPEDEF = new ParserErrorCode.con3('ABST RACT_TYPEDEF', 4, "Type aliases cannot be declared to be 'abstract'"); 7346 static const ParserErrorCode ABSTRACT_TYPEDEF = const ParserErrorCode.con3('AB STRACT_TYPEDEF', 4, "Type aliases cannot be declared to be 'abstract'");
7363 7347
7364 static final ParserErrorCode ASSERT_DOES_NOT_TAKE_ASSIGNMENT = new ParserError Code.con3('ASSERT_DOES_NOT_TAKE_ASSIGNMENT', 5, "Assert cannot be called on an a ssignment"); 7348 static const ParserErrorCode ASSERT_DOES_NOT_TAKE_ASSIGNMENT = const ParserErr orCode.con3('ASSERT_DOES_NOT_TAKE_ASSIGNMENT', 5, "Assert cannot be called on an assignment");
7365 7349
7366 static final ParserErrorCode ASSERT_DOES_NOT_TAKE_CASCADE = new ParserErrorCod e.con3('ASSERT_DOES_NOT_TAKE_CASCADE', 6, "Assert cannot be called on cascade"); 7350 static const ParserErrorCode ASSERT_DOES_NOT_TAKE_CASCADE = const ParserErrorC ode.con3('ASSERT_DOES_NOT_TAKE_CASCADE', 6, "Assert cannot be called on cascade" );
7367 7351
7368 static final ParserErrorCode ASSERT_DOES_NOT_TAKE_THROW = new ParserErrorCode. con3('ASSERT_DOES_NOT_TAKE_THROW', 7, "Assert cannot be called on throws"); 7352 static const ParserErrorCode ASSERT_DOES_NOT_TAKE_THROW = const ParserErrorCod e.con3('ASSERT_DOES_NOT_TAKE_THROW', 7, "Assert cannot be called on throws");
7369 7353
7370 static final ParserErrorCode ASSERT_DOES_NOT_TAKE_RETHROW = new ParserErrorCod e.con3('ASSERT_DOES_NOT_TAKE_RETHROW', 8, "Assert cannot be called on rethrows") ; 7354 static const ParserErrorCode ASSERT_DOES_NOT_TAKE_RETHROW = const ParserErrorC ode.con3('ASSERT_DOES_NOT_TAKE_RETHROW', 8, "Assert cannot be called on rethrows ");
7371 7355
7372 static final ParserErrorCode BREAK_OUTSIDE_OF_LOOP = new ParserErrorCode.con3( 'BREAK_OUTSIDE_OF_LOOP', 9, "A break statement cannot be used outside of a loop or switch statement"); 7356 static const ParserErrorCode BREAK_OUTSIDE_OF_LOOP = const ParserErrorCode.con 3('BREAK_OUTSIDE_OF_LOOP', 9, "A break statement cannot be used outside of a loo p or switch statement");
7373 7357
7374 static final ParserErrorCode CONST_AND_FINAL = new ParserErrorCode.con3('CONST _AND_FINAL', 10, "Members cannot be declared to be both 'const' and 'final'"); 7358 static const ParserErrorCode CONST_AND_FINAL = const ParserErrorCode.con3('CON ST_AND_FINAL', 10, "Members cannot be declared to be both 'const' and 'final'");
7375 7359
7376 static final ParserErrorCode CONST_AND_VAR = new ParserErrorCode.con3('CONST_A ND_VAR', 11, "Members cannot be declared to be both 'const' and 'var'"); 7360 static const ParserErrorCode CONST_AND_VAR = const ParserErrorCode.con3('CONST _AND_VAR', 11, "Members cannot be declared to be both 'const' and 'var'");
7377 7361
7378 static final ParserErrorCode CONST_CLASS = new ParserErrorCode.con3('CONST_CLA SS', 12, "Classes cannot be declared to be 'const'"); 7362 static const ParserErrorCode CONST_CLASS = const ParserErrorCode.con3('CONST_C LASS', 12, "Classes cannot be declared to be 'const'");
7379 7363
7380 static final ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = new ParserErrorCode .con3('CONST_CONSTRUCTOR_WITH_BODY', 13, "'const' constructors cannot have a bod y"); 7364 static const ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = const ParserErrorCo de.con3('CONST_CONSTRUCTOR_WITH_BODY', 13, "'const' constructors cannot have a b ody");
7381 7365
7382 static final ParserErrorCode CONST_FACTORY = new ParserErrorCode.con3('CONST_F ACTORY', 14, "Only redirecting factory constructors can be declared to be 'const '"); 7366 static const ParserErrorCode CONST_FACTORY = const ParserErrorCode.con3('CONST _FACTORY', 14, "Only redirecting factory constructors can be declared to be 'con st'");
7383 7367
7384 static final ParserErrorCode CONST_METHOD = new ParserErrorCode.con3('CONST_ME THOD', 15, "Getters, setters and methods cannot be declared to be 'const'"); 7368 static const ParserErrorCode CONST_METHOD = const ParserErrorCode.con3('CONST_ METHOD', 15, "Getters, setters and methods cannot be declared to be 'const'");
7385 7369
7386 static final ParserErrorCode CONST_TYPEDEF = new ParserErrorCode.con3('CONST_T YPEDEF', 16, "Type aliases cannot be declared to be 'const'"); 7370 static const ParserErrorCode CONST_TYPEDEF = const ParserErrorCode.con3('CONST _TYPEDEF', 16, "Type aliases cannot be declared to be 'const'");
7387 7371
7388 static final ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE = new ParserErrorCod e.con3('CONSTRUCTOR_WITH_RETURN_TYPE', 17, "Constructors cannot have a return ty pe"); 7372 static const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE = const ParserErrorC ode.con3('CONSTRUCTOR_WITH_RETURN_TYPE', 17, "Constructors cannot have a return type");
7389 7373
7390 static final ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP = new ParserErrorCode.co n3('CONTINUE_OUTSIDE_OF_LOOP', 18, "A continue statement cannot be used outside of a loop or switch statement"); 7374 static const ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP = const ParserErrorCode. con3('CONTINUE_OUTSIDE_OF_LOOP', 18, "A continue statement cannot be used outsid e of a loop or switch statement");
7391 7375
7392 static final ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE = new ParserErrorC ode.con3('CONTINUE_WITHOUT_LABEL_IN_CASE', 19, "A continue statement in a switch statement must have a label as a target"); 7376 static const ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE = const ParserErro rCode.con3('CONTINUE_WITHOUT_LABEL_IN_CASE', 19, "A continue statement in a swit ch statement must have a label as a target");
7393 7377
7394 static final ParserErrorCode DEPRECATED_ARGUMENT_DEFINITION_TEST = new ParserE rrorCode.con3('DEPRECATED_ARGUMENT_DEFINITION_TEST', 20, "The argument definitio n test ('?' operator) has been deprecated"); 7378 static const ParserErrorCode DEPRECATED_ARGUMENT_DEFINITION_TEST = const Parse rErrorCode.con3('DEPRECATED_ARGUMENT_DEFINITION_TEST', 20, "The argument definit ion test ('?' operator) has been deprecated");
7395 7379
7396 static final ParserErrorCode DEPRECATED_CLASS_TYPE_ALIAS = new ParserErrorCode .con3('DEPRECATED_CLASS_TYPE_ALIAS', 21, "The 'typedef' mixin application was re placed with 'class'"); 7380 static const ParserErrorCode DEPRECATED_CLASS_TYPE_ALIAS = const ParserErrorCo de.con3('DEPRECATED_CLASS_TYPE_ALIAS', 21, "The 'typedef' mixin application was replaced with 'class'");
7397 7381
7398 static final ParserErrorCode DIRECTIVE_AFTER_DECLARATION = new ParserErrorCode .con3('DIRECTIVE_AFTER_DECLARATION', 22, "Directives must appear before any decl arations"); 7382 static const ParserErrorCode DIRECTIVE_AFTER_DECLARATION = const ParserErrorCo de.con3('DIRECTIVE_AFTER_DECLARATION', 22, "Directives must appear before any de clarations");
7399 7383
7400 static final ParserErrorCode DUPLICATE_LABEL_IN_SWITCH_STATEMENT = new ParserE rrorCode.con3('DUPLICATE_LABEL_IN_SWITCH_STATEMENT', 23, "The label %s was alrea dy used in this switch statement"); 7384 static const ParserErrorCode DUPLICATE_LABEL_IN_SWITCH_STATEMENT = const Parse rErrorCode.con3('DUPLICATE_LABEL_IN_SWITCH_STATEMENT', 23, "The label %s was alr eady used in this switch statement");
7401 7385
7402 static final ParserErrorCode DUPLICATED_MODIFIER = new ParserErrorCode.con3('D UPLICATED_MODIFIER', 24, "The modifier '%s' was already specified."); 7386 static const ParserErrorCode DUPLICATED_MODIFIER = const ParserErrorCode.con3( 'DUPLICATED_MODIFIER', 24, "The modifier '%s' was already specified.");
7403 7387
7404 static final ParserErrorCode EQUALITY_CANNOT_BE_EQUALITY_OPERAND = new ParserE rrorCode.con3('EQUALITY_CANNOT_BE_EQUALITY_OPERAND', 25, "Equality expression ca nnot be operand of another equality expression."); 7388 static const ParserErrorCode EQUALITY_CANNOT_BE_EQUALITY_OPERAND = const Parse rErrorCode.con3('EQUALITY_CANNOT_BE_EQUALITY_OPERAND', 25, "Equality expression cannot be operand of another equality expression.");
7405 7389
7406 static final ParserErrorCode EXPECTED_CASE_OR_DEFAULT = new ParserErrorCode.co n3('EXPECTED_CASE_OR_DEFAULT', 26, "Expected 'case' or 'default'"); 7390 static const ParserErrorCode EXPECTED_CASE_OR_DEFAULT = const ParserErrorCode. con3('EXPECTED_CASE_OR_DEFAULT', 26, "Expected 'case' or 'default'");
7407 7391
7408 static final ParserErrorCode EXPECTED_CLASS_MEMBER = new ParserErrorCode.con3( 'EXPECTED_CLASS_MEMBER', 27, "Expected a class member"); 7392 static const ParserErrorCode EXPECTED_CLASS_MEMBER = const ParserErrorCode.con 3('EXPECTED_CLASS_MEMBER', 27, "Expected a class member");
7409 7393
7410 static final ParserErrorCode EXPECTED_EXECUTABLE = new ParserErrorCode.con3('E XPECTED_EXECUTABLE', 28, "Expected a method, getter, setter or operator declarat ion"); 7394 static const ParserErrorCode EXPECTED_EXECUTABLE = const ParserErrorCode.con3( 'EXPECTED_EXECUTABLE', 28, "Expected a method, getter, setter or operator declar ation");
7411 7395
7412 static final ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = new ParserErrorCod e.con3('EXPECTED_LIST_OR_MAP_LITERAL', 29, "Expected a list or map literal"); 7396 static const ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = const ParserErrorC ode.con3('EXPECTED_LIST_OR_MAP_LITERAL', 29, "Expected a list or map literal");
7413 7397
7414 static final ParserErrorCode EXPECTED_STRING_LITERAL = new ParserErrorCode.con 3('EXPECTED_STRING_LITERAL', 30, "Expected a string literal"); 7398 static const ParserErrorCode EXPECTED_STRING_LITERAL = const ParserErrorCode.c on3('EXPECTED_STRING_LITERAL', 30, "Expected a string literal");
7415 7399
7416 static final ParserErrorCode EXPECTED_TOKEN = new ParserErrorCode.con3('EXPECT ED_TOKEN', 31, "Expected to find '%s'"); 7400 static const ParserErrorCode EXPECTED_TOKEN = const ParserErrorCode.con3('EXPE CTED_TOKEN', 31, "Expected to find '%s'");
7417 7401
7418 static final ParserErrorCode EXPECTED_TYPE_NAME = new ParserErrorCode.con3('EX PECTED_TYPE_NAME', 32, "Expected a type name"); 7402 static const ParserErrorCode EXPECTED_TYPE_NAME = const ParserErrorCode.con3(' EXPECTED_TYPE_NAME', 32, "Expected a type name");
7419 7403
7420 static final ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new Parse rErrorCode.con3('EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 33, "Export directives must preceed part directives"); 7404 static const ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = const Par serErrorCode.con3('EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 33, "Export directive s must preceed part directives");
7421 7405
7422 static final ParserErrorCode EXTERNAL_AFTER_CONST = new ParserErrorCode.con3(' EXTERNAL_AFTER_CONST', 34, "The modifier 'external' should be before the modifie r 'const'"); 7406 static const ParserErrorCode EXTERNAL_AFTER_CONST = const ParserErrorCode.con3 ('EXTERNAL_AFTER_CONST', 34, "The modifier 'external' should be before the modif ier 'const'");
7423 7407
7424 static final ParserErrorCode EXTERNAL_AFTER_FACTORY = new ParserErrorCode.con3 ('EXTERNAL_AFTER_FACTORY', 35, "The modifier 'external' should be before the mod ifier 'factory'"); 7408 static const ParserErrorCode EXTERNAL_AFTER_FACTORY = const ParserErrorCode.co n3('EXTERNAL_AFTER_FACTORY', 35, "The modifier 'external' should be before the m odifier 'factory'");
7425 7409
7426 static final ParserErrorCode EXTERNAL_AFTER_STATIC = new ParserErrorCode.con3( 'EXTERNAL_AFTER_STATIC', 36, "The modifier 'external' should be before the modif ier 'static'"); 7410 static const ParserErrorCode EXTERNAL_AFTER_STATIC = const ParserErrorCode.con 3('EXTERNAL_AFTER_STATIC', 36, "The modifier 'external' should be before the mod ifier 'static'");
7427 7411
7428 static final ParserErrorCode EXTERNAL_CLASS = new ParserErrorCode.con3('EXTERN AL_CLASS', 37, "Classes cannot be declared to be 'external'"); 7412 static const ParserErrorCode EXTERNAL_CLASS = const ParserErrorCode.con3('EXTE RNAL_CLASS', 37, "Classes cannot be declared to be 'external'");
7429 7413
7430 static final ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY = new ParserErrorC ode.con3('EXTERNAL_CONSTRUCTOR_WITH_BODY', 38, "External constructors cannot hav e a body"); 7414 static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY = const ParserErro rCode.con3('EXTERNAL_CONSTRUCTOR_WITH_BODY', 38, "External constructors cannot h ave a body");
7431 7415
7432 static final ParserErrorCode EXTERNAL_FIELD = new ParserErrorCode.con3('EXTERN AL_FIELD', 39, "Fields cannot be declared to be 'external'"); 7416 static const ParserErrorCode EXTERNAL_FIELD = const ParserErrorCode.con3('EXTE RNAL_FIELD', 39, "Fields cannot be declared to be 'external'");
7433 7417
7434 static final ParserErrorCode EXTERNAL_GETTER_WITH_BODY = new ParserErrorCode.c on3('EXTERNAL_GETTER_WITH_BODY', 40, "External getters cannot have a body"); 7418 static const ParserErrorCode EXTERNAL_GETTER_WITH_BODY = const ParserErrorCode .con3('EXTERNAL_GETTER_WITH_BODY', 40, "External getters cannot have a body");
7435 7419
7436 static final ParserErrorCode EXTERNAL_METHOD_WITH_BODY = new ParserErrorCode.c on3('EXTERNAL_METHOD_WITH_BODY', 41, "External methods cannot have a body"); 7420 static const ParserErrorCode EXTERNAL_METHOD_WITH_BODY = const ParserErrorCode .con3('EXTERNAL_METHOD_WITH_BODY', 41, "External methods cannot have a body");
7437 7421
7438 static final ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = new ParserErrorCode .con3('EXTERNAL_OPERATOR_WITH_BODY', 42, "External operators cannot have a body" ); 7422 static const ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = const ParserErrorCo de.con3('EXTERNAL_OPERATOR_WITH_BODY', 42, "External operators cannot have a bod y");
7439 7423
7440 static final ParserErrorCode EXTERNAL_SETTER_WITH_BODY = new ParserErrorCode.c on3('EXTERNAL_SETTER_WITH_BODY', 43, "External setters cannot have a body"); 7424 static const ParserErrorCode EXTERNAL_SETTER_WITH_BODY = const ParserErrorCode .con3('EXTERNAL_SETTER_WITH_BODY', 43, "External setters cannot have a body");
7441 7425
7442 static final ParserErrorCode EXTERNAL_TYPEDEF = new ParserErrorCode.con3('EXTE RNAL_TYPEDEF', 44, "Type aliases cannot be declared to be 'external'"); 7426 static const ParserErrorCode EXTERNAL_TYPEDEF = const ParserErrorCode.con3('EX TERNAL_TYPEDEF', 44, "Type aliases cannot be declared to be 'external'");
7443 7427
7444 static final ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = new ParserErrorCo de.con3('FACTORY_TOP_LEVEL_DECLARATION', 45, "Top-level declarations cannot be d eclared to be 'factory'"); 7428 static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = const ParserError Code.con3('FACTORY_TOP_LEVEL_DECLARATION', 45, "Top-level declarations cannot be declared to be 'factory'");
7445 7429
7446 static final ParserErrorCode FACTORY_WITHOUT_BODY = new ParserErrorCode.con3(' FACTORY_WITHOUT_BODY', 46, "A non-redirecting 'factory' constructor must have a body"); 7430 static const ParserErrorCode FACTORY_WITHOUT_BODY = const ParserErrorCode.con3 ('FACTORY_WITHOUT_BODY', 46, "A non-redirecting 'factory' constructor must have a body");
7447 7431
7448 static final ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new Parse rErrorCode.con3('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 47, "Field initializers can only be used in a constructor"); 7432 static const ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = const Par serErrorCode.con3('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 47, "Field initialize rs can only be used in a constructor");
7449 7433
7450 static final ParserErrorCode FINAL_AND_VAR = new ParserErrorCode.con3('FINAL_A ND_VAR', 48, "Members cannot be declared to be both 'final' and 'var'"); 7434 static const ParserErrorCode FINAL_AND_VAR = const ParserErrorCode.con3('FINAL _AND_VAR', 48, "Members cannot be declared to be both 'final' and 'var'");
7451 7435
7452 static final ParserErrorCode FINAL_CLASS = new ParserErrorCode.con3('FINAL_CLA SS', 49, "Classes cannot be declared to be 'final'"); 7436 static const ParserErrorCode FINAL_CLASS = const ParserErrorCode.con3('FINAL_C LASS', 49, "Classes cannot be declared to be 'final'");
7453 7437
7454 static final ParserErrorCode FINAL_CONSTRUCTOR = new ParserErrorCode.con3('FIN AL_CONSTRUCTOR', 50, "A constructor cannot be declared to be 'final'"); 7438 static const ParserErrorCode FINAL_CONSTRUCTOR = const ParserErrorCode.con3('F INAL_CONSTRUCTOR', 50, "A constructor cannot be declared to be 'final'");
7455 7439
7456 static final ParserErrorCode FINAL_METHOD = new ParserErrorCode.con3('FINAL_ME THOD', 51, "Getters, setters and methods cannot be declared to be 'final'"); 7440 static const ParserErrorCode FINAL_METHOD = const ParserErrorCode.con3('FINAL_ METHOD', 51, "Getters, setters and methods cannot be declared to be 'final'");
7457 7441
7458 static final ParserErrorCode FINAL_TYPEDEF = new ParserErrorCode.con3('FINAL_T YPEDEF', 52, "Type aliases cannot be declared to be 'final'"); 7442 static const ParserErrorCode FINAL_TYPEDEF = const ParserErrorCode.con3('FINAL _TYPEDEF', 52, "Type aliases cannot be declared to be 'final'");
7459 7443
7460 static final ParserErrorCode FUNCTION_TYPED_PARAMETER_VAR = new ParserErrorCod e.con3('FUNCTION_TYPED_PARAMETER_VAR', 53, "Function typed parameters cannot spe cify 'const', 'final' or 'var' instead of return type"); 7444 static const ParserErrorCode FUNCTION_TYPED_PARAMETER_VAR = const ParserErrorC ode.con3('FUNCTION_TYPED_PARAMETER_VAR', 53, "Function typed parameters cannot s pecify 'const', 'final' or 'var' instead of return type");
7461 7445
7462 static final ParserErrorCode GETTER_IN_FUNCTION = new ParserErrorCode.con3('GE TTER_IN_FUNCTION', 54, "Getters cannot be defined within methods or functions"); 7446 static const ParserErrorCode GETTER_IN_FUNCTION = const ParserErrorCode.con3(' GETTER_IN_FUNCTION', 54, "Getters cannot be defined within methods or functions" );
7463 7447
7464 static final ParserErrorCode GETTER_WITH_PARAMETERS = new ParserErrorCode.con3 ('GETTER_WITH_PARAMETERS', 55, "Getter should be declared without a parameter li st"); 7448 static const ParserErrorCode GETTER_WITH_PARAMETERS = const ParserErrorCode.co n3('GETTER_WITH_PARAMETERS', 55, "Getter should be declared without a parameter list");
7465 7449
7466 static final ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = new Parser ErrorCode.con3('ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE', 56, "Illegal assignment t o non-assignable expression"); 7450 static const ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = const Pars erErrorCode.con3('ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE', 56, "Illegal assignment to non-assignable expression");
7467 7451
7468 static final ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS = new ParserErrorCode.c on3('IMPLEMENTS_BEFORE_EXTENDS', 57, "The extends clause must be before the impl ements clause"); 7452 static const ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS = const ParserErrorCode .con3('IMPLEMENTS_BEFORE_EXTENDS', 57, "The extends clause must be before the im plements clause");
7469 7453
7470 static final ParserErrorCode IMPLEMENTS_BEFORE_WITH = new ParserErrorCode.con3 ('IMPLEMENTS_BEFORE_WITH', 58, "The with clause must be before the implements cl ause"); 7454 static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = const ParserErrorCode.co n3('IMPLEMENTS_BEFORE_WITH', 58, "The with clause must be before the implements clause");
7471 7455
7472 static final ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new Parse rErrorCode.con3('IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 59, "Import directives must preceed part directives"); 7456 static const ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = const Par serErrorCode.con3('IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 59, "Import directive s must preceed part directives");
7473 7457
7474 static final ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH = new ParserErro rCode.con3('INITIALIZED_VARIABLE_IN_FOR_EACH', 60, "The loop variable in a for-e ach loop cannot be initialized"); 7458 static const ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH = const ParserEr rorCode.con3('INITIALIZED_VARIABLE_IN_FOR_EACH', 60, "The loop variable in a for -each loop cannot be initialized");
7475 7459
7476 static final ParserErrorCode INVALID_CODE_POINT = new ParserErrorCode.con3('IN VALID_CODE_POINT', 61, "The escape sequence '%s' is not a valid code point"); 7460 static const ParserErrorCode INVALID_CODE_POINT = const ParserErrorCode.con3(' INVALID_CODE_POINT', 61, "The escape sequence '%s' is not a valid code point");
7477 7461
7478 static final ParserErrorCode INVALID_COMMENT_REFERENCE = new ParserErrorCode.c on3('INVALID_COMMENT_REFERENCE', 62, "Comment references should contain a possib ly prefixed identifier and can start with 'new', but should not contain anything else"); 7462 static const ParserErrorCode INVALID_COMMENT_REFERENCE = const ParserErrorCode .con3('INVALID_COMMENT_REFERENCE', 62, "Comment references should contain a poss ibly prefixed identifier and can start with 'new', but should not contain anythi ng else");
7479 7463
7480 static final ParserErrorCode INVALID_HEX_ESCAPE = new ParserErrorCode.con3('IN VALID_HEX_ESCAPE', 63, "An escape sequence starting with '\\x' must be followed by 2 hexidecimal digits"); 7464 static const ParserErrorCode INVALID_HEX_ESCAPE = const ParserErrorCode.con3(' INVALID_HEX_ESCAPE', 63, "An escape sequence starting with '\\x' must be followe d by 2 hexidecimal digits");
7481 7465
7482 static final ParserErrorCode INVALID_OPERATOR = new ParserErrorCode.con3('INVA LID_OPERATOR', 64, "The string '%s' is not a valid operator"); 7466 static const ParserErrorCode INVALID_OPERATOR = const ParserErrorCode.con3('IN VALID_OPERATOR', 64, "The string '%s' is not a valid operator");
7483 7467
7484 static final ParserErrorCode INVALID_OPERATOR_FOR_SUPER = new ParserErrorCode. con3('INVALID_OPERATOR_FOR_SUPER', 65, "The operator '%s' cannot be used with 's uper'"); 7468 static const ParserErrorCode INVALID_OPERATOR_FOR_SUPER = const ParserErrorCod e.con3('INVALID_OPERATOR_FOR_SUPER', 65, "The operator '%s' cannot be used with 'super'");
7485 7469
7486 static final ParserErrorCode INVALID_UNICODE_ESCAPE = new ParserErrorCode.con3 ('INVALID_UNICODE_ESCAPE', 66, "An escape sequence starting with '\\u' must be f ollowed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'"); 7470 static const ParserErrorCode INVALID_UNICODE_ESCAPE = const ParserErrorCode.co n3('INVALID_UNICODE_ESCAPE', 66, "An escape sequence starting with '\\u' must be followed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'");
7487 7471
7488 static final ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST = new ParserErrorCode .con3('LIBRARY_DIRECTIVE_NOT_FIRST', 67, "The library directive must appear befo re all other directives"); 7472 static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST = const ParserErrorCo de.con3('LIBRARY_DIRECTIVE_NOT_FIRST', 67, "The library directive must appear be fore all other directives");
7489 7473
7490 static final ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER = new ParserE rrorCode.con3('LOCAL_FUNCTION_DECLARATION_MODIFIER', 68, "Local function declara tions cannot specify any modifier"); 7474 static const ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER = const Parse rErrorCode.con3('LOCAL_FUNCTION_DECLARATION_MODIFIER', 68, "Local function decla rations cannot specify any modifier");
7491 7475
7492 static final ParserErrorCode MISSING_ASSIGNABLE_SELECTOR = new ParserErrorCode .con3('MISSING_ASSIGNABLE_SELECTOR', 69, "Missing selector such as \".<identifie r>\" or \"[0]\""); 7476 static const ParserErrorCode MISSING_ASSIGNABLE_SELECTOR = const ParserErrorCo de.con3('MISSING_ASSIGNABLE_SELECTOR', 69, "Missing selector such as \".<identif ier>\" or \"[0]\"");
7493 7477
7494 static final ParserErrorCode MISSING_CATCH_OR_FINALLY = new ParserErrorCode.co n3('MISSING_CATCH_OR_FINALLY', 70, "A try statement must have either a catch or finally clause"); 7478 static const ParserErrorCode MISSING_CATCH_OR_FINALLY = const ParserErrorCode. con3('MISSING_CATCH_OR_FINALLY', 70, "A try statement must have either a catch o r finally clause");
7495 7479
7496 static final ParserErrorCode MISSING_CLASS_BODY = new ParserErrorCode.con3('MI SSING_CLASS_BODY', 71, "A class definition must have a body, even if it is empty "); 7480 static const ParserErrorCode MISSING_CLASS_BODY = const ParserErrorCode.con3(' MISSING_CLASS_BODY', 71, "A class definition must have a body, even if it is emp ty");
7497 7481
7498 static final ParserErrorCode MISSING_CLOSING_PARENTHESIS = new ParserErrorCode .con3('MISSING_CLOSING_PARENTHESIS', 72, "The closing parenthesis is missing"); 7482 static const ParserErrorCode MISSING_CLOSING_PARENTHESIS = const ParserErrorCo de.con3('MISSING_CLOSING_PARENTHESIS', 72, "The closing parenthesis is missing") ;
7499 7483
7500 static final ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE = new ParserError Code.con3('MISSING_CONST_FINAL_VAR_OR_TYPE', 73, "Variables must be declared usi ng the keywords 'const', 'final', 'var' or a type name"); 7484 static const ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE = const ParserErr orCode.con3('MISSING_CONST_FINAL_VAR_OR_TYPE', 73, "Variables must be declared u sing the keywords 'const', 'final', 'var' or a type name");
7501 7485
7502 static final ParserErrorCode MISSING_EXPRESSION_IN_THROW = new ParserErrorCode .con3('MISSING_EXPRESSION_IN_THROW', 74, "Throw expressions must compute the obj ect to be thrown"); 7486 static const ParserErrorCode MISSING_EXPRESSION_IN_THROW = const ParserErrorCo de.con3('MISSING_EXPRESSION_IN_THROW', 74, "Throw expressions must compute the o bject to be thrown");
7503 7487
7504 static final ParserErrorCode MISSING_FUNCTION_BODY = new ParserErrorCode.con3( 'MISSING_FUNCTION_BODY', 75, "A function body must be provided"); 7488 static const ParserErrorCode MISSING_FUNCTION_BODY = const ParserErrorCode.con 3('MISSING_FUNCTION_BODY', 75, "A function body must be provided");
7505 7489
7506 static final ParserErrorCode MISSING_FUNCTION_PARAMETERS = new ParserErrorCode .con3('MISSING_FUNCTION_PARAMETERS', 76, "Functions must have an explicit list o f parameters"); 7490 static const ParserErrorCode MISSING_FUNCTION_PARAMETERS = const ParserErrorCo de.con3('MISSING_FUNCTION_PARAMETERS', 76, "Functions must have an explicit list of parameters");
7507 7491
7508 static final ParserErrorCode MISSING_IDENTIFIER = new ParserErrorCode.con3('MI SSING_IDENTIFIER', 77, "Expected an identifier"); 7492 static const ParserErrorCode MISSING_IDENTIFIER = const ParserErrorCode.con3(' MISSING_IDENTIFIER', 77, "Expected an identifier");
7509 7493
7510 static final ParserErrorCode MISSING_KEYWORD_OPERATOR = new ParserErrorCode.co n3('MISSING_KEYWORD_OPERATOR', 78, "Operator declarations must be preceeded by t he keyword 'operator'"); 7494 static const ParserErrorCode MISSING_KEYWORD_OPERATOR = const ParserErrorCode. con3('MISSING_KEYWORD_OPERATOR', 78, "Operator declarations must be preceeded by the keyword 'operator'");
7511 7495
7512 static final ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = new ParserErr orCode.con3('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 79, "Library directives must in clude a library name"); 7496 static const ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = const ParserE rrorCode.con3('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 79, "Library directives must include a library name");
7513 7497
7514 static final ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = new ParserErr orCode.con3('MISSING_NAME_IN_PART_OF_DIRECTIVE', 80, "Library directives must in clude a library name"); 7498 static const ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = const ParserE rrorCode.con3('MISSING_NAME_IN_PART_OF_DIRECTIVE', 80, "Library directives must include a library name");
7515 7499
7516 static final ParserErrorCode MISSING_STATEMENT = new ParserErrorCode.con3('MIS SING_STATEMENT', 81, "Expected a statement"); 7500 static const ParserErrorCode MISSING_STATEMENT = const ParserErrorCode.con3('M ISSING_STATEMENT', 81, "Expected a statement");
7517 7501
7518 static final ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = new Pars erErrorCode.con3('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 82, "There is no '%s' to close the parameter group"); 7502 static const ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = const Pa rserErrorCode.con3('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 82, "There is no '% s' to close the parameter group");
7519 7503
7520 static final ParserErrorCode MISSING_TYPEDEF_PARAMETERS = new ParserErrorCode. con3('MISSING_TYPEDEF_PARAMETERS', 83, "Type aliases for functions must have an explicit list of parameters"); 7504 static const ParserErrorCode MISSING_TYPEDEF_PARAMETERS = const ParserErrorCod e.con3('MISSING_TYPEDEF_PARAMETERS', 83, "Type aliases for functions must have a n explicit list of parameters");
7521 7505
7522 static final ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = new ParserErrorCod e.con3('MISSING_VARIABLE_IN_FOR_EACH', 84, "A loop variable must be declared in a for-each loop before the 'in', but none were found"); 7506 static const ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = const ParserErrorC ode.con3('MISSING_VARIABLE_IN_FOR_EACH', 84, "A loop variable must be declared i n a for-each loop before the 'in', but none were found");
7523 7507
7524 static final ParserErrorCode MIXED_PARAMETER_GROUPS = new ParserErrorCode.con3 ('MIXED_PARAMETER_GROUPS', 85, "Cannot have both positional and named parameters in a single parameter list"); 7508 static const ParserErrorCode MIXED_PARAMETER_GROUPS = const ParserErrorCode.co n3('MIXED_PARAMETER_GROUPS', 85, "Cannot have both positional and named paramete rs in a single parameter list");
7525 7509
7526 static final ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = new ParserErrorCode.co n3('MULTIPLE_EXTENDS_CLAUSES', 86, "Each class definition can have at most one e xtends clause"); 7510 static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = const ParserErrorCode. con3('MULTIPLE_EXTENDS_CLAUSES', 86, "Each class definition can have at most one extends clause");
7527 7511
7528 static final ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = new ParserErrorCode .con3('MULTIPLE_IMPLEMENTS_CLAUSES', 87, "Each class definition can have at most one implements clause"); 7512 static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = const ParserErrorCo de.con3('MULTIPLE_IMPLEMENTS_CLAUSES', 87, "Each class definition can have at mo st one implements clause");
7529 7513
7530 static final ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = new ParserErrorCode .con3('MULTIPLE_LIBRARY_DIRECTIVES', 88, "Only one library directive may be decl ared in a file"); 7514 static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = const ParserErrorCo de.con3('MULTIPLE_LIBRARY_DIRECTIVES', 88, "Only one library directive may be de clared in a file");
7531 7515
7532 static final ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = new ParserError Code.con3('MULTIPLE_NAMED_PARAMETER_GROUPS', 89, "Cannot have multiple groups of named parameters in a single parameter list"); 7516 static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = const ParserErr orCode.con3('MULTIPLE_NAMED_PARAMETER_GROUPS', 89, "Cannot have multiple groups of named parameters in a single parameter list");
7533 7517
7534 static final ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = new ParserErrorCode .con3('MULTIPLE_PART_OF_DIRECTIVES', 90, "Only one part-of directive may be decl ared in a file"); 7518 static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = const ParserErrorCo de.con3('MULTIPLE_PART_OF_DIRECTIVES', 90, "Only one part-of directive may be de clared in a file");
7535 7519
7536 static final ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = new Parser ErrorCode.con3('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 91, "Cannot have multiple groups of positional parameters in a single parameter list"); 7520 static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = const Pars erErrorCode.con3('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 91, "Cannot have multip le groups of positional parameters in a single parameter list");
7537 7521
7538 static final ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = new ParserErrorC ode.con3('MULTIPLE_VARIABLES_IN_FOR_EACH', 92, "A single loop variable must be d eclared in a for-each loop before the 'in', but %s were found"); 7522 static const ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = const ParserErro rCode.con3('MULTIPLE_VARIABLES_IN_FOR_EACH', 92, "A single loop variable must be declared in a for-each loop before the 'in', but %s were found");
7539 7523
7540 static final ParserErrorCode MULTIPLE_WITH_CLAUSES = new ParserErrorCode.con3( 'MULTIPLE_WITH_CLAUSES', 93, "Each class definition can have at most one with cl ause"); 7524 static const ParserErrorCode MULTIPLE_WITH_CLAUSES = const ParserErrorCode.con 3('MULTIPLE_WITH_CLAUSES', 93, "Each class definition can have at most one with clause");
7541 7525
7542 static final ParserErrorCode NAMED_FUNCTION_EXPRESSION = new ParserErrorCode.c on3('NAMED_FUNCTION_EXPRESSION', 94, "Function expressions cannot be named"); 7526 static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = const ParserErrorCode .con3('NAMED_FUNCTION_EXPRESSION', 94, "Function expressions cannot be named");
7543 7527
7544 static final ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = new ParserErrorCo de.con3('NAMED_PARAMETER_OUTSIDE_GROUP', 95, "Named parameters must be enclosed in curly braces ('{' and '}')"); 7528 static const ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = const ParserError Code.con3('NAMED_PARAMETER_OUTSIDE_GROUP', 95, "Named parameters must be enclose d in curly braces ('{' and '}')");
7545 7529
7546 static final ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = new ParserErrorCo de.con3('NATIVE_CLAUSE_IN_NON_SDK_CODE', 96, "Native clause can only be used in the SDK and code that is loaded through native extensions"); 7530 static const ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = const ParserError Code.con3('NATIVE_CLAUSE_IN_NON_SDK_CODE', 96, "Native clause can only be used i n the SDK and code that is loaded through native extensions");
7547 7531
7548 static final ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = new Parser ErrorCode.con3('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 97, "Native functions can only be declared in the SDK and code that is loaded through native extensions") ; 7532 static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = const Pars erErrorCode.con3('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 97, "Native functions c an only be declared in the SDK and code that is loaded through native extensions ");
7549 7533
7550 static final ParserErrorCode NON_CONSTRUCTOR_FACTORY = new ParserErrorCode.con 3('NON_CONSTRUCTOR_FACTORY', 98, "Only constructors can be declared to be a 'fac tory'"); 7534 static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = const ParserErrorCode.c on3('NON_CONSTRUCTOR_FACTORY', 98, "Only constructors can be declared to be a 'f actory'");
7551 7535
7552 static final ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = new ParserErrorCode .con3('NON_IDENTIFIER_LIBRARY_NAME', 99, "The name of a library must be an ident ifier"); 7536 static const ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = const ParserErrorCo de.con3('NON_IDENTIFIER_LIBRARY_NAME', 99, "The name of a library must be an ide ntifier");
7553 7537
7554 static final ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = new ParserErrorCo de.con3('NON_PART_OF_DIRECTIVE_IN_PART', 100, "The part-of directive must be the only directive in a part"); 7538 static const ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = const ParserError Code.con3('NON_PART_OF_DIRECTIVE_IN_PART', 100, "The part-of directive must be t he only directive in a part");
7555 7539
7556 static final ParserErrorCode NON_USER_DEFINABLE_OPERATOR = new ParserErrorCode .con3('NON_USER_DEFINABLE_OPERATOR', 101, "The operator '%s' is not user definab le"); 7540 static const ParserErrorCode NON_USER_DEFINABLE_OPERATOR = const ParserErrorCo de.con3('NON_USER_DEFINABLE_OPERATOR', 101, "The operator '%s' is not user defin able");
7557 7541
7558 static final ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = new ParserErr orCode.con3('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 102, "Normal parameters must oc cur before optional parameters"); 7542 static const ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = const ParserE rrorCode.con3('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 102, "Normal parameters must occur before optional parameters");
7559 7543
7560 static final ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = new ParserError Code.con3('POSITIONAL_AFTER_NAMED_ARGUMENT', 103, "Positional arguments must occ ur before named arguments"); 7544 static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = const ParserErr orCode.con3('POSITIONAL_AFTER_NAMED_ARGUMENT', 103, "Positional arguments must o ccur before named arguments");
7561 7545
7562 static final ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = new ParserEr rorCode.con3('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 104, "Positional parameters m ust be enclosed in square brackets ('[' and ']')"); 7546 static const ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = const Parser ErrorCode.con3('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 104, "Positional parameters must be enclosed in square brackets ('[' and ']')");
7563 7547
7564 static final ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = new Pars erErrorCode.con3('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 105, "Only factory co nstructor can specify '=' redirection."); 7548 static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = const Pa rserErrorCode.con3('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 105, "Only factory constructor can specify '=' redirection.");
7565 7549
7566 static final ParserErrorCode SETTER_IN_FUNCTION = new ParserErrorCode.con3('SE TTER_IN_FUNCTION', 106, "Setters cannot be defined within methods or functions") ; 7550 static const ParserErrorCode SETTER_IN_FUNCTION = const ParserErrorCode.con3(' SETTER_IN_FUNCTION', 106, "Setters cannot be defined within methods or functions ");
7567 7551
7568 static final ParserErrorCode STATIC_AFTER_CONST = new ParserErrorCode.con3('ST ATIC_AFTER_CONST', 107, "The modifier 'static' should be before the modifier 'co nst'"); 7552 static const ParserErrorCode STATIC_AFTER_CONST = const ParserErrorCode.con3(' STATIC_AFTER_CONST', 107, "The modifier 'static' should be before the modifier ' const'");
7569 7553
7570 static final ParserErrorCode STATIC_AFTER_FINAL = new ParserErrorCode.con3('ST ATIC_AFTER_FINAL', 108, "The modifier 'static' should be before the modifier 'fi nal'"); 7554 static const ParserErrorCode STATIC_AFTER_FINAL = const ParserErrorCode.con3(' STATIC_AFTER_FINAL', 108, "The modifier 'static' should be before the modifier ' final'");
7571 7555
7572 static final ParserErrorCode STATIC_AFTER_VAR = new ParserErrorCode.con3('STAT IC_AFTER_VAR', 109, "The modifier 'static' should be before the modifier 'var'") ; 7556 static const ParserErrorCode STATIC_AFTER_VAR = const ParserErrorCode.con3('ST ATIC_AFTER_VAR', 109, "The modifier 'static' should be before the modifier 'var' ");
7573 7557
7574 static final ParserErrorCode STATIC_CONSTRUCTOR = new ParserErrorCode.con3('ST ATIC_CONSTRUCTOR', 110, "Constructors cannot be static"); 7558 static const ParserErrorCode STATIC_CONSTRUCTOR = const ParserErrorCode.con3(' STATIC_CONSTRUCTOR', 110, "Constructors cannot be static");
7575 7559
7576 static final ParserErrorCode STATIC_GETTER_WITHOUT_BODY = new ParserErrorCode. con3('STATIC_GETTER_WITHOUT_BODY', 111, "A 'static' getter must have a body"); 7560 static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = const ParserErrorCod e.con3('STATIC_GETTER_WITHOUT_BODY', 111, "A 'static' getter must have a body");
7577 7561
7578 static final ParserErrorCode STATIC_OPERATOR = new ParserErrorCode.con3('STATI C_OPERATOR', 112, "Operators cannot be static"); 7562 static const ParserErrorCode STATIC_OPERATOR = const ParserErrorCode.con3('STA TIC_OPERATOR', 112, "Operators cannot be static");
7579 7563
7580 static final ParserErrorCode STATIC_SETTER_WITHOUT_BODY = new ParserErrorCode. con3('STATIC_SETTER_WITHOUT_BODY', 113, "A 'static' setter must have a body"); 7564 static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = const ParserErrorCod e.con3('STATIC_SETTER_WITHOUT_BODY', 113, "A 'static' setter must have a body");
7581 7565
7582 static final ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = new ParserErrorCod e.con3('STATIC_TOP_LEVEL_DECLARATION', 114, "Top-level declarations cannot be de clared to be 'static'"); 7566 static const ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = const ParserErrorC ode.con3('STATIC_TOP_LEVEL_DECLARATION', 114, "Top-level declarations cannot be declared to be 'static'");
7583 7567
7584 static final ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = new ParserEr rorCode.con3('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 115, "The 'default' case shou ld be the last case in a switch statement"); 7568 static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = const Parser ErrorCode.con3('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 115, "The 'default' case sh ould be the last case in a switch statement");
7585 7569
7586 static final ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = new ParserErr orCode.con3('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 116, "The 'default' case can on ly be declared once"); 7570 static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = const ParserE rrorCode.con3('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 116, "The 'default' case can only be declared once");
7587 7571
7588 static final ParserErrorCode TOP_LEVEL_OPERATOR = new ParserErrorCode.con3('TO P_LEVEL_OPERATOR', 117, "Operators must be declared within a class"); 7572 static const ParserErrorCode TOP_LEVEL_OPERATOR = const ParserErrorCode.con3(' TOP_LEVEL_OPERATOR', 117, "Operators must be declared within a class");
7589 7573
7590 static final ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = new P arserErrorCode.con3('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 118, "There is no '%s' to open a parameter group"); 7574 static const ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = const ParserErrorCode.con3('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 118, "There i s no '%s' to open a parameter group");
7591 7575
7592 static final ParserErrorCode UNEXPECTED_TOKEN = new ParserErrorCode.con3('UNEX PECTED_TOKEN', 119, "Unexpected token '%s'"); 7576 static const ParserErrorCode UNEXPECTED_TOKEN = const ParserErrorCode.con3('UN EXPECTED_TOKEN', 119, "Unexpected token '%s'");
7593 7577
7594 static final ParserErrorCode WITH_BEFORE_EXTENDS = new ParserErrorCode.con3('W ITH_BEFORE_EXTENDS', 120, "The extends clause must be before the with clause"); 7578 static const ParserErrorCode WITH_BEFORE_EXTENDS = const ParserErrorCode.con3( 'WITH_BEFORE_EXTENDS', 120, "The extends clause must be before the with clause") ;
7595 7579
7596 static final ParserErrorCode WITH_WITHOUT_EXTENDS = new ParserErrorCode.con3(' WITH_WITHOUT_EXTENDS', 121, "The with clause cannot be used without an extends c lause"); 7580 static const ParserErrorCode WITH_WITHOUT_EXTENDS = const ParserErrorCode.con3 ('WITH_WITHOUT_EXTENDS', 121, "The with clause cannot be used without an extends clause");
7597 7581
7598 static final ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = new ParserE rrorCode.con3('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 122, "The default value of a named parameter should be preceeded by ':'"); 7582 static const ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = const Parse rErrorCode.con3('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 122, "The default value o f a named parameter should be preceeded by ':'");
7599 7583
7600 static final ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = new Pa rserErrorCode.con3('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 123, "The default value of a positional parameter should be preceeded by '='"); 7584 static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = const ParserErrorCode.con3('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 123, "The defau lt value of a positional parameter should be preceeded by '='");
7601 7585
7602 static final ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = new Parser ErrorCode.con3('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 124, "Expected '%s' to cl ose parameter group"); 7586 static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = const Pars erErrorCode.con3('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 124, "Expected '%s' to close parameter group");
7603 7587
7604 static final ParserErrorCode VAR_AND_TYPE = new ParserErrorCode.con3('VAR_AND_ TYPE', 125, "Variables cannot be declared using both 'var' and a type name; remo ve the 'var'"); 7588 static const ParserErrorCode VAR_AND_TYPE = const ParserErrorCode.con3('VAR_AN D_TYPE', 125, "Variables cannot be declared using both 'var' and a type name; re move the 'var'");
7605 7589
7606 static final ParserErrorCode VAR_AS_TYPE_NAME = new ParserErrorCode.con3('VAR_ AS_TYPE_NAME', 126, "The keyword 'var' cannot be used as a type name"); 7590 static const ParserErrorCode VAR_AS_TYPE_NAME = const ParserErrorCode.con3('VA R_AS_TYPE_NAME', 126, "The keyword 'var' cannot be used as a type name");
7607 7591
7608 static final ParserErrorCode VAR_CLASS = new ParserErrorCode.con3('VAR_CLASS', 127, "Classes cannot be declared to be 'var'"); 7592 static const ParserErrorCode VAR_CLASS = const ParserErrorCode.con3('VAR_CLASS ', 127, "Classes cannot be declared to be 'var'");
7609 7593
7610 static final ParserErrorCode VAR_RETURN_TYPE = new ParserErrorCode.con3('VAR_R ETURN_TYPE', 128, "The return type cannot be 'var'"); 7594 static const ParserErrorCode VAR_RETURN_TYPE = const ParserErrorCode.con3('VAR _RETURN_TYPE', 128, "The return type cannot be 'var'");
7611 7595
7612 static final ParserErrorCode VAR_TYPEDEF = new ParserErrorCode.con3('VAR_TYPED EF', 129, "Type aliases cannot be declared to be 'var'"); 7596 static const ParserErrorCode VAR_TYPEDEF = const ParserErrorCode.con3('VAR_TYP EDEF', 129, "Type aliases cannot be declared to be 'var'");
7613 7597
7614 static final ParserErrorCode VOID_PARAMETER = new ParserErrorCode.con3('VOID_P ARAMETER', 130, "Parameters cannot have a type of 'void'"); 7598 static const ParserErrorCode VOID_PARAMETER = const ParserErrorCode.con3('VOID _PARAMETER', 130, "Parameters cannot have a type of 'void'");
7615 7599
7616 static final ParserErrorCode VOID_VARIABLE = new ParserErrorCode.con3('VOID_VA RIABLE', 131, "Variables cannot have a type of 'void'"); 7600 static const ParserErrorCode VOID_VARIABLE = const ParserErrorCode.con3('VOID_ VARIABLE', 131, "Variables cannot have a type of 'void'");
7617 7601
7618 static final List<ParserErrorCode> values = [ 7602 static const List<ParserErrorCode> values = const [
7619 ABSTRACT_CLASS_MEMBER, 7603 ABSTRACT_CLASS_MEMBER,
7620 ABSTRACT_STATIC_METHOD, 7604 ABSTRACT_STATIC_METHOD,
7621 ABSTRACT_TOP_LEVEL_FUNCTION, 7605 ABSTRACT_TOP_LEVEL_FUNCTION,
7622 ABSTRACT_TOP_LEVEL_VARIABLE, 7606 ABSTRACT_TOP_LEVEL_VARIABLE,
7623 ABSTRACT_TYPEDEF, 7607 ABSTRACT_TYPEDEF,
7624 ASSERT_DOES_NOT_TAKE_ASSIGNMENT, 7608 ASSERT_DOES_NOT_TAKE_ASSIGNMENT,
7625 ASSERT_DOES_NOT_TAKE_CASCADE, 7609 ASSERT_DOES_NOT_TAKE_CASCADE,
7626 ASSERT_DOES_NOT_TAKE_THROW, 7610 ASSERT_DOES_NOT_TAKE_THROW,
7627 ASSERT_DOES_NOT_TAKE_RETHROW, 7611 ASSERT_DOES_NOT_TAKE_RETHROW,
7628 BREAK_OUTSIDE_OF_LOOP, 7612 BREAK_OUTSIDE_OF_LOOP,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
7745 VAR_AS_TYPE_NAME, 7729 VAR_AS_TYPE_NAME,
7746 VAR_CLASS, 7730 VAR_CLASS,
7747 VAR_RETURN_TYPE, 7731 VAR_RETURN_TYPE,
7748 VAR_TYPEDEF, 7732 VAR_TYPEDEF,
7749 VOID_PARAMETER, 7733 VOID_PARAMETER,
7750 VOID_VARIABLE]; 7734 VOID_VARIABLE];
7751 7735
7752 /** 7736 /**
7753 * The severity of this error. 7737 * The severity of this error.
7754 */ 7738 */
7755 ErrorSeverity _severity; 7739 final ErrorSeverity errorSeverity;
7756 7740
7757 /** 7741 /**
7758 * The template used to create the message to be displayed for this error. 7742 * The template used to create the message to be displayed for this error.
7759 */ 7743 */
7760 String _message; 7744 final String message;
7761 7745
7762 /** 7746 /**
7763 * The template used to create the correction to be displayed for this error, or `null` if 7747 * The template used to create the correction to be displayed for this error, or `null` if
7764 * there is no correction information for this error. 7748 * there is no correction information for this error.
7765 */ 7749 */
7766 String correction8; 7750 final String correction;
7767 7751
7768 /** 7752 /**
7769 * Initialize a newly created error code to have the given severity and messag e. 7753 * Initialize a newly created error code to have the given severity and messag e.
7770 * 7754 *
7771 * @param severity the severity of the error 7755 * @param errorSeverity the severity of the error
7772 * @param message the message template used to create the message to be displa yed for the error 7756 * @param message the message template used to create the message to be displa yed for the error
7773 */ 7757 */
7774 ParserErrorCode.con1(String name, int ordinal, ErrorSeverity severity, String message) : super(name, ordinal) { 7758 const ParserErrorCode.con1(String name, int ordinal, ErrorSeverity errorSeveri ty, String message) : this.con2(name, ordinal, errorSeverity, message, null);
7775 this._severity = severity;
7776 this._message = message;
7777 }
7778 7759
7779 /** 7760 /**
7780 * Initialize a newly created error code to have the given severity, message a nd correction. 7761 * Initialize a newly created error code to have the given severity, message a nd correction.
7781 * 7762 *
7782 * @param severity the severity of the error 7763 * @param errorSeverity the severity of the error
7783 * @param message the template used to create the message to be displayed for the error 7764 * @param message the template used to create the message to be displayed for the error
7784 * @param correction the template used to create the correction to be displaye d for the error 7765 * @param correction the template used to create the correction to be displaye d for the error
7785 */ 7766 */
7786 ParserErrorCode.con2(String name, int ordinal, ErrorSeverity severity, String message, String correction) : super(name, ordinal) { 7767 const ParserErrorCode.con2(String name, int ordinal, this.errorSeverity, this. message, this.correction) : super(name, ordinal);
7787 this._severity = severity;
7788 this._message = message;
7789 this.correction8 = correction;
7790 }
7791 7768
7792 /** 7769 /**
7793 * Initialize a newly created error code to have the given message and a sever ity of ERROR. 7770 * Initialize a newly created error code to have the given message and a sever ity of ERROR.
7794 * 7771 *
7795 * @param message the message template used to create the message to be displa yed for the error 7772 * @param message the message template used to create the message to be displa yed for the error
7796 */ 7773 */
7797 ParserErrorCode.con3(String name, int ordinal, String message) : this.con1(nam e, ordinal, ErrorSeverity.ERROR, message); 7774 const ParserErrorCode.con3(String name, int ordinal, String message) : this.co n2(name, ordinal, ErrorSeverity.ERROR, message, null);
7798
7799 @override
7800 String get correction => correction8;
7801
7802 @override
7803 ErrorSeverity get errorSeverity => _severity;
7804
7805 @override
7806 String get message => _message;
7807 7775
7808 @override 7776 @override
7809 ErrorType get type => ErrorType.SYNTACTIC_ERROR; 7777 ErrorType get type => ErrorType.SYNTACTIC_ERROR;
7810 } 7778 }
7811 7779
7812 /** 7780 /**
7813 * Instances of the class `ResolutionCopier` copies resolution information from one AST 7781 * Instances of the class `ResolutionCopier` copies resolution information from one AST
7814 * structure to another as long as the structures of the corresponding children of a pair of nodes 7782 * structure to another as long as the structures of the corresponding children of a pair of nodes
7815 * are the same. 7783 * are the same.
7816 */ 7784 */
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
8994 return trampoline(target, arguments[0], arguments[1]); 8962 return trampoline(target, arguments[0], arguments[1]);
8995 case 3: 8963 case 3:
8996 return trampoline(target, arguments[0], arguments[1], arguments[2]); 8964 return trampoline(target, arguments[0], arguments[1], arguments[2]);
8997 case 4: 8965 case 4:
8998 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]); 8966 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]);
8999 default: 8967 default:
9000 throw new IllegalArgumentException("Not implemented for > 4 arguments"); 8968 throw new IllegalArgumentException("Not implemented for > 4 arguments");
9001 } 8969 }
9002 } 8970 }
9003 } 8971 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698