| 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:math" as math; | 10 import "dart:math" as math; |
| (...skipping 6543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6554 if (!_tokenMatchesString(keyword, ASYNC)) { | 6554 if (!_tokenMatchesString(keyword, ASYNC)) { |
| 6555 _reportErrorForToken(ParserErrorCode.INVALID_SYNC, keyword); | 6555 _reportErrorForToken(ParserErrorCode.INVALID_SYNC, keyword); |
| 6556 keyword = null; | 6556 keyword = null; |
| 6557 } else if (star != null) { | 6557 } else if (star != null) { |
| 6558 _reportErrorForToken( | 6558 _reportErrorForToken( |
| 6559 ParserErrorCode.INVALID_STAR_AFTER_ASYNC, | 6559 ParserErrorCode.INVALID_STAR_AFTER_ASYNC, |
| 6560 star); | 6560 star); |
| 6561 } | 6561 } |
| 6562 } | 6562 } |
| 6563 Token functionDefinition = andAdvance; | 6563 Token functionDefinition = andAdvance; |
| 6564 if (_matchesKeyword(Keyword.RETURN)) { |
| 6565 _reportErrorForToken( |
| 6566 ParserErrorCode.UNEXPECTED_TOKEN, |
| 6567 andAdvance); |
| 6568 } |
| 6564 Expression expression = parseExpression2(); | 6569 Expression expression = parseExpression2(); |
| 6565 Token semicolon = null; | 6570 Token semicolon = null; |
| 6566 if (!inExpression) { | 6571 if (!inExpression) { |
| 6567 semicolon = _expect(TokenType.SEMICOLON); | 6572 semicolon = _expect(TokenType.SEMICOLON); |
| 6568 } | 6573 } |
| 6569 if (!_parseFunctionBodies) { | 6574 if (!_parseFunctionBodies) { |
| 6570 return new EmptyFunctionBody( | 6575 return new EmptyFunctionBody( |
| 6571 _createSyntheticToken(TokenType.SEMICOLON)); | 6576 _createSyntheticToken(TokenType.SEMICOLON)); |
| 6572 } | 6577 } |
| 6573 return new ExpressionFunctionBody( | 6578 return new ExpressionFunctionBody( |
| (...skipping 5548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12122 * Copy resolution data from one node to another. | 12127 * Copy resolution data from one node to another. |
| 12123 * | 12128 * |
| 12124 * @param fromNode the node from which resolution information will be copied | 12129 * @param fromNode the node from which resolution information will be copied |
| 12125 * @param toNode the node to which resolution information will be copied | 12130 * @param toNode the node to which resolution information will be copied |
| 12126 */ | 12131 */ |
| 12127 static void copyResolutionData(AstNode fromNode, AstNode toNode) { | 12132 static void copyResolutionData(AstNode fromNode, AstNode toNode) { |
| 12128 ResolutionCopier copier = new ResolutionCopier(); | 12133 ResolutionCopier copier = new ResolutionCopier(); |
| 12129 copier._isEqualNodes(fromNode, toNode); | 12134 copier._isEqualNodes(fromNode, toNode); |
| 12130 } | 12135 } |
| 12131 } | 12136 } |
| OLD | NEW |