| 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 4251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4262 _inInitializer = false; | 4262 _inInitializer = false; |
| 4263 try { | 4263 try { |
| 4264 Expression expression = parseExpression2(); | 4264 Expression expression = parseExpression2(); |
| 4265 Token rightParenthesis = _expect(TokenType.CLOSE_PAREN); | 4265 Token rightParenthesis = _expect(TokenType.CLOSE_PAREN); |
| 4266 return new ParenthesizedExpression( | 4266 return new ParenthesizedExpression( |
| 4267 leftParenthesis, expression, rightParenthesis); | 4267 leftParenthesis, expression, rightParenthesis); |
| 4268 } finally { | 4268 } finally { |
| 4269 _inInitializer = wasInInitializer; | 4269 _inInitializer = wasInInitializer; |
| 4270 } | 4270 } |
| 4271 } else if (type == TokenType.LT || _injectGenericCommentTypeList()) { | 4271 } else if (type == TokenType.LT || _injectGenericCommentTypeList()) { |
| 4272 if (isFunctionExpression(currentToken)) { |
| 4273 return parseFunctionExpression(); |
| 4274 } |
| 4272 return parseListOrMapLiteral(null); | 4275 return parseListOrMapLiteral(null); |
| 4273 } else if (type == TokenType.OPEN_CURLY_BRACKET) { | 4276 } else if (type == TokenType.OPEN_CURLY_BRACKET) { |
| 4274 return parseMapLiteral(null, null); | 4277 return parseMapLiteral(null, null); |
| 4275 } else if (type == TokenType.OPEN_SQUARE_BRACKET || | 4278 } else if (type == TokenType.OPEN_SQUARE_BRACKET || |
| 4276 type == TokenType.INDEX) { | 4279 type == TokenType.INDEX) { |
| 4277 return parseListLiteral(null, null); | 4280 return parseListLiteral(null, null); |
| 4278 } else if (type == TokenType.QUESTION && | 4281 } else if (type == TokenType.QUESTION && |
| 4279 _tokenMatches(_peek(), TokenType.IDENTIFIER)) { | 4282 _tokenMatches(_peek(), TokenType.IDENTIFIER)) { |
| 4280 _reportErrorForCurrentToken( | 4283 _reportErrorForCurrentToken( |
| 4281 ParserErrorCode.UNEXPECTED_TOKEN, [_currentToken.lexeme]); | 4284 ParserErrorCode.UNEXPECTED_TOKEN, [_currentToken.lexeme]); |
| (...skipping 3835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8117 */ | 8120 */ |
| 8118 Parser_SyntheticKeywordToken(Keyword keyword, int offset) | 8121 Parser_SyntheticKeywordToken(Keyword keyword, int offset) |
| 8119 : super(keyword, offset); | 8122 : super(keyword, offset); |
| 8120 | 8123 |
| 8121 @override | 8124 @override |
| 8122 int get length => 0; | 8125 int get length => 0; |
| 8123 | 8126 |
| 8124 @override | 8127 @override |
| 8125 Token copy() => new Parser_SyntheticKeywordToken(keyword, offset); | 8128 Token copy() => new Parser_SyntheticKeywordToken(keyword, offset); |
| 8126 } | 8129 } |
| OLD | NEW |