| 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 6339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6350 expression = astFactory.functionExpressionInvocation( | 6350 expression = astFactory.functionExpressionInvocation( |
| 6351 expression, typeArguments, argumentList); | 6351 expression, typeArguments, argumentList); |
| 6352 } | 6352 } |
| 6353 if (!primaryAllowed) { | 6353 if (!primaryAllowed) { |
| 6354 isOptional = false; | 6354 isOptional = false; |
| 6355 } | 6355 } |
| 6356 } | 6356 } |
| 6357 Expression selectorExpression = parseAssignableSelector( | 6357 Expression selectorExpression = parseAssignableSelector( |
| 6358 expression, isOptional || (expression is PrefixedIdentifier)); | 6358 expression, isOptional || (expression is PrefixedIdentifier)); |
| 6359 if (identical(selectorExpression, expression)) { | 6359 if (identical(selectorExpression, expression)) { |
| 6360 if (!isOptional && (expression is PrefixedIdentifier)) { | |
| 6361 PrefixedIdentifier identifier = expression as PrefixedIdentifier; | |
| 6362 expression = astFactory.propertyAccess( | |
| 6363 identifier.prefix, identifier.period, identifier.identifier); | |
| 6364 } | |
| 6365 return expression; | 6360 return expression; |
| 6366 } | 6361 } |
| 6367 expression = selectorExpression; | 6362 expression = selectorExpression; |
| 6368 isOptional = true; | 6363 isOptional = true; |
| 6369 } | 6364 } |
| 6370 } | 6365 } |
| 6371 | 6366 |
| 6372 /** | 6367 /** |
| 6373 * Parse a block when we need to check for an open curly brace and recover | 6368 * Parse a block when we need to check for an open curly brace and recover |
| 6374 * when there isn't one. Return the block that was parsed. | 6369 * when there isn't one. Return the block that was parsed. |
| (...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8499 */ | 8494 */ |
| 8500 Parser_SyntheticKeywordToken(Keyword keyword, int offset) | 8495 Parser_SyntheticKeywordToken(Keyword keyword, int offset) |
| 8501 : super(keyword, offset); | 8496 : super(keyword, offset); |
| 8502 | 8497 |
| 8503 @override | 8498 @override |
| 8504 int get length => 0; | 8499 int get length => 0; |
| 8505 | 8500 |
| 8506 @override | 8501 @override |
| 8507 Token copy() => new Parser_SyntheticKeywordToken(keyword, offset); | 8502 Token copy() => new Parser_SyntheticKeywordToken(keyword, offset); |
| 8508 } | 8503 } |
| OLD | NEW |