| 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 3207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3218 */ | 3218 */ |
| 3219 bool _isFunctionExpression(Token startToken) { | 3219 bool _isFunctionExpression(Token startToken) { |
| 3220 // Function expressions aren't allowed in initializer lists. | 3220 // Function expressions aren't allowed in initializer lists. |
| 3221 if (_inInitializer) { | 3221 if (_inInitializer) { |
| 3222 return false; | 3222 return false; |
| 3223 } | 3223 } |
| 3224 Token afterParameters = _skipFormalParameterList(startToken); | 3224 Token afterParameters = _skipFormalParameterList(startToken); |
| 3225 if (afterParameters == null) { | 3225 if (afterParameters == null) { |
| 3226 return false; | 3226 return false; |
| 3227 } | 3227 } |
| 3228 return afterParameters.matchesAny([TokenType.OPEN_CURLY_BRACKET, TokenType.F
UNCTION]); | 3228 if (afterParameters.matchesAny([TokenType.OPEN_CURLY_BRACKET, TokenType.FUNC
TION])) { |
| 3229 return true; |
| 3230 } |
| 3231 if (_parseAsync) { |
| 3232 String lexeme = afterParameters.lexeme; |
| 3233 return lexeme == ASYNC || lexeme == SYNC; |
| 3234 } |
| 3235 return false; |
| 3229 } | 3236 } |
| 3230 | 3237 |
| 3231 /** | 3238 /** |
| 3232 * Return `true` if the given character is a valid hexadecimal digit. | 3239 * Return `true` if the given character is a valid hexadecimal digit. |
| 3233 * | 3240 * |
| 3234 * @param character the character being tested | 3241 * @param character the character being tested |
| 3235 * @return `true` if the character is a valid hexadecimal digit | 3242 * @return `true` if the character is a valid hexadecimal digit |
| 3236 */ | 3243 */ |
| 3237 bool _isHexDigit(int character) => (0x30 <= character && character <= 0x39) ||
(0x41 <= character && character <= 0x46) || (0x61 <= character && character <=
0x66); | 3244 bool _isHexDigit(int character) => (0x30 <= character && character <= 0x39) ||
(0x41 <= character && character <= 0x46) || (0x61 <= character && character <=
0x66); |
| 3238 | 3245 |
| (...skipping 6228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9467 return trampoline(target, arguments[0], arguments[1]); | 9474 return trampoline(target, arguments[0], arguments[1]); |
| 9468 case 3: | 9475 case 3: |
| 9469 return trampoline(target, arguments[0], arguments[1], arguments[2]); | 9476 return trampoline(target, arguments[0], arguments[1], arguments[2]); |
| 9470 case 4: | 9477 case 4: |
| 9471 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); | 9478 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); |
| 9472 default: | 9479 default: |
| 9473 throw new IllegalArgumentException("Not implemented for > 4 arguments"); | 9480 throw new IllegalArgumentException("Not implemented for > 4 arguments"); |
| 9474 } | 9481 } |
| 9475 } | 9482 } |
| 9476 } | 9483 } |
| OLD | NEW |