| 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 // 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 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 4395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4406 initializers.add(_parseRedirectingConstructorInvocation()); | 4406 initializers.add(_parseRedirectingConstructorInvocation()); |
| 4407 } else { | 4407 } else { |
| 4408 initializers.add(_parseConstructorFieldInitializer()); | 4408 initializers.add(_parseConstructorFieldInitializer()); |
| 4409 } | 4409 } |
| 4410 } else if (_matchesKeyword(Keyword.SUPER)) { | 4410 } else if (_matchesKeyword(Keyword.SUPER)) { |
| 4411 initializers.add(_parseSuperConstructorInvocation()); | 4411 initializers.add(_parseSuperConstructorInvocation()); |
| 4412 } else { | 4412 } else { |
| 4413 initializers.add(_parseConstructorFieldInitializer()); | 4413 initializers.add(_parseConstructorFieldInitializer()); |
| 4414 } | 4414 } |
| 4415 } while (_optional(TokenType.COMMA)); | 4415 } while (_optional(TokenType.COMMA)); |
| 4416 if (factoryKeyword != null) { |
| 4417 _reportErrorForToken(ParserErrorCode.FACTORY_WITH_INITIALIZERS, factoryK
eyword, []); |
| 4418 } |
| 4416 } | 4419 } |
| 4417 ConstructorName redirectedConstructor = null; | 4420 ConstructorName redirectedConstructor = null; |
| 4418 FunctionBody body; | 4421 FunctionBody body; |
| 4419 if (_matches(TokenType.EQ)) { | 4422 if (_matches(TokenType.EQ)) { |
| 4420 separator = andAdvance; | 4423 separator = andAdvance; |
| 4421 redirectedConstructor = parseConstructorName(); | 4424 redirectedConstructor = parseConstructorName(); |
| 4422 body = new EmptyFunctionBody(_expect(TokenType.SEMICOLON)); | 4425 body = new EmptyFunctionBody(_expect(TokenType.SEMICOLON)); |
| 4423 if (factoryKeyword == null) { | 4426 if (factoryKeyword == null) { |
| 4424 _reportErrorForNode(ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCT
OR, redirectedConstructor, []); | 4427 _reportErrorForNode(ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCT
OR, redirectedConstructor, []); |
| 4425 } | 4428 } |
| (...skipping 3511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7937 static const ParserErrorCode EXTERNAL_METHOD_WITH_BODY = const ParserErrorCode
('EXTERNAL_METHOD_WITH_BODY', "External methods cannot have a body"); | 7940 static const ParserErrorCode EXTERNAL_METHOD_WITH_BODY = const ParserErrorCode
('EXTERNAL_METHOD_WITH_BODY', "External methods cannot have a body"); |
| 7938 | 7941 |
| 7939 static const ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = const ParserErrorCo
de('EXTERNAL_OPERATOR_WITH_BODY', "External operators cannot have a body"); | 7942 static const ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = const ParserErrorCo
de('EXTERNAL_OPERATOR_WITH_BODY', "External operators cannot have a body"); |
| 7940 | 7943 |
| 7941 static const ParserErrorCode EXTERNAL_SETTER_WITH_BODY = const ParserErrorCode
('EXTERNAL_SETTER_WITH_BODY', "External setters cannot have a body"); | 7944 static const ParserErrorCode EXTERNAL_SETTER_WITH_BODY = const ParserErrorCode
('EXTERNAL_SETTER_WITH_BODY', "External setters cannot have a body"); |
| 7942 | 7945 |
| 7943 static const ParserErrorCode EXTERNAL_TYPEDEF = const ParserErrorCode('EXTERNA
L_TYPEDEF', "Type aliases cannot be declared to be 'external'"); | 7946 static const ParserErrorCode EXTERNAL_TYPEDEF = const ParserErrorCode('EXTERNA
L_TYPEDEF', "Type aliases cannot be declared to be 'external'"); |
| 7944 | 7947 |
| 7945 static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = const ParserError
Code('FACTORY_TOP_LEVEL_DECLARATION', "Top-level declarations cannot be declared
to be 'factory'"); | 7948 static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = const ParserError
Code('FACTORY_TOP_LEVEL_DECLARATION', "Top-level declarations cannot be declared
to be 'factory'"); |
| 7946 | 7949 |
| 7950 static const ParserErrorCode FACTORY_WITH_INITIALIZERS |
| 7951 = const ParserErrorCode( |
| 7952 'FACTORY_WITH_INITIALIZERS', |
| 7953 "A 'factory' constructor cannot have initializers", |
| 7954 "Either remove the 'factory' keyword to make this a generative " |
| 7955 "constructor or remove the initializers."); |
| 7956 |
| 7947 static const ParserErrorCode FACTORY_WITHOUT_BODY = const ParserErrorCode('FAC
TORY_WITHOUT_BODY', "A non-redirecting 'factory' constructor must have a body"); | 7957 static const ParserErrorCode FACTORY_WITHOUT_BODY = const ParserErrorCode('FAC
TORY_WITHOUT_BODY', "A non-redirecting 'factory' constructor must have a body"); |
| 7948 | 7958 |
| 7949 static const ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = const Par
serErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', "Field initializers can on
ly be used in a constructor"); | 7959 static const ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = const Par
serErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', "Field initializers can on
ly be used in a constructor"); |
| 7950 | 7960 |
| 7951 static const ParserErrorCode FINAL_AND_VAR = const ParserErrorCode('FINAL_AND_
VAR', "Members cannot be declared to be both 'final' and 'var'"); | 7961 static const ParserErrorCode FINAL_AND_VAR = const ParserErrorCode('FINAL_AND_
VAR', "Members cannot be declared to be both 'final' and 'var'"); |
| 7952 | 7962 |
| 7953 static const ParserErrorCode FINAL_CLASS = const ParserErrorCode('FINAL_CLASS'
, "Classes cannot be declared to be 'final'"); | 7963 static const ParserErrorCode FINAL_CLASS = const ParserErrorCode('FINAL_CLASS'
, "Classes cannot be declared to be 'final'"); |
| 7954 | 7964 |
| 7955 static const ParserErrorCode FINAL_CONSTRUCTOR = const ParserErrorCode('FINAL_
CONSTRUCTOR', "A constructor cannot be declared to be 'final'"); | 7965 static const ParserErrorCode FINAL_CONSTRUCTOR = const ParserErrorCode('FINAL_
CONSTRUCTOR', "A constructor cannot be declared to be 'final'"); |
| 7956 | 7966 |
| (...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9772 return trampoline(target, arguments[0], arguments[1]); | 9782 return trampoline(target, arguments[0], arguments[1]); |
| 9773 case 3: | 9783 case 3: |
| 9774 return trampoline(target, arguments[0], arguments[1], arguments[2]); | 9784 return trampoline(target, arguments[0], arguments[1], arguments[2]); |
| 9775 case 4: | 9785 case 4: |
| 9776 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); | 9786 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); |
| 9777 default: | 9787 default: |
| 9778 throw new IllegalArgumentException("Not implemented for > 4 arguments"); | 9788 throw new IllegalArgumentException("Not implemented for > 4 arguments"); |
| 9779 } | 9789 } |
| 9780 } | 9790 } |
| 9781 } | 9791 } |
| OLD | NEW |