| 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 library analyzer.src.generated.parser; | 5 library analyzer.src.generated.parser; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import "dart:math" as math; | 8 import "dart:math" as math; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 7031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7042 return _parseWhileStatement(); | 7042 return _parseWhileStatement(); |
| 7043 } else if (keyword == Keyword.VAR || keyword == Keyword.FINAL) { | 7043 } else if (keyword == Keyword.VAR || keyword == Keyword.FINAL) { |
| 7044 return _parseVariableDeclarationStatementAfterMetadata( | 7044 return _parseVariableDeclarationStatementAfterMetadata( |
| 7045 commentAndMetadata); | 7045 commentAndMetadata); |
| 7046 } else if (keyword == Keyword.VOID) { | 7046 } else if (keyword == Keyword.VOID) { |
| 7047 TypeName returnType = parseReturnType(); | 7047 TypeName returnType = parseReturnType(); |
| 7048 if (_matchesIdentifier() && | 7048 if (_matchesIdentifier() && |
| 7049 _peek().matchesAny([ | 7049 _peek().matchesAny([ |
| 7050 TokenType.OPEN_PAREN, | 7050 TokenType.OPEN_PAREN, |
| 7051 TokenType.OPEN_CURLY_BRACKET, | 7051 TokenType.OPEN_CURLY_BRACKET, |
| 7052 TokenType.FUNCTION | 7052 TokenType.FUNCTION, |
| 7053 TokenType.LT |
| 7053 ])) { | 7054 ])) { |
| 7054 return _parseFunctionDeclarationStatementAfterReturnType( | 7055 return _parseFunctionDeclarationStatementAfterReturnType( |
| 7055 commentAndMetadata, returnType); | 7056 commentAndMetadata, returnType); |
| 7056 } else { | 7057 } else { |
| 7057 // | 7058 // |
| 7058 // We have found an error of some kind. Try to recover. | 7059 // We have found an error of some kind. Try to recover. |
| 7059 // | 7060 // |
| 7060 if (_matchesIdentifier()) { | 7061 if (_matchesIdentifier()) { |
| 7061 if (_peek().matchesAny( | 7062 if (_peek().matchesAny( |
| 7062 [TokenType.EQ, TokenType.COMMA, TokenType.SEMICOLON])) { | 7063 [TokenType.EQ, TokenType.COMMA, TokenType.SEMICOLON])) { |
| (...skipping 4295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11358 } | 11359 } |
| 11359 | 11360 |
| 11360 /** | 11361 /** |
| 11361 * Copy resolution data from the [fromNode] to the [toNode]. | 11362 * Copy resolution data from the [fromNode] to the [toNode]. |
| 11362 */ | 11363 */ |
| 11363 static void copyResolutionData(AstNode fromNode, AstNode toNode) { | 11364 static void copyResolutionData(AstNode fromNode, AstNode toNode) { |
| 11364 ResolutionCopier copier = new ResolutionCopier(); | 11365 ResolutionCopier copier = new ResolutionCopier(); |
| 11365 copier._isEqualNodes(fromNode, toNode); | 11366 copier._isEqualNodes(fromNode, toNode); |
| 11366 } | 11367 } |
| 11367 } | 11368 } |
| OLD | NEW |