| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 SimpleIdentifier identifier = AstTestFactory.identifier3(name); | 493 SimpleIdentifier identifier = AstTestFactory.identifier3(name); |
| 494 identifier.staticElement = _enclosingConstructor.parameters | 494 identifier.staticElement = _enclosingConstructor.parameters |
| 495 .firstWhere((parameter) => parameter.name == name, | 495 .firstWhere((parameter) => parameter.name == name, |
| 496 orElse: () => throw new StateError( | 496 orElse: () => throw new StateError( |
| 497 'Unable to resolve constructor parameter: $name')); | 497 'Unable to resolve constructor parameter: $name')); |
| 498 _push(identifier); | 498 _push(identifier); |
| 499 break; | 499 break; |
| 500 case UnlinkedExprOperation.ifNull: | 500 case UnlinkedExprOperation.ifNull: |
| 501 _pushBinary(TokenType.QUESTION_QUESTION); | 501 _pushBinary(TokenType.QUESTION_QUESTION); |
| 502 break; | 502 break; |
| 503 case UnlinkedExprOperation.await: |
| 504 Expression expression = _pop(); |
| 505 _push(AstTestFactory.awaitExpression(expression)); |
| 506 break; |
| 503 case UnlinkedExprOperation.assignToRef: | 507 case UnlinkedExprOperation.assignToRef: |
| 504 case UnlinkedExprOperation.assignToProperty: | 508 case UnlinkedExprOperation.assignToProperty: |
| 505 case UnlinkedExprOperation.assignToIndex: | 509 case UnlinkedExprOperation.assignToIndex: |
| 506 case UnlinkedExprOperation.extractIndex: | 510 case UnlinkedExprOperation.extractIndex: |
| 507 case UnlinkedExprOperation.invokeMethod: | 511 case UnlinkedExprOperation.invokeMethod: |
| 508 case UnlinkedExprOperation.cascadeSectionBegin: | 512 case UnlinkedExprOperation.cascadeSectionBegin: |
| 509 case UnlinkedExprOperation.cascadeSectionEnd: | 513 case UnlinkedExprOperation.cascadeSectionEnd: |
| 510 case UnlinkedExprOperation.typeCast: | 514 case UnlinkedExprOperation.typeCast: |
| 511 case UnlinkedExprOperation.typeCheck: | 515 case UnlinkedExprOperation.typeCheck: |
| 512 case UnlinkedExprOperation.throwException: | 516 case UnlinkedExprOperation.throwException: |
| (...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 static String _getElementIdentifier(String name, ReferenceKind kind) { | 1887 static String _getElementIdentifier(String name, ReferenceKind kind) { |
| 1884 if (kind == ReferenceKind.topLevelPropertyAccessor || | 1888 if (kind == ReferenceKind.topLevelPropertyAccessor || |
| 1885 kind == ReferenceKind.propertyAccessor) { | 1889 kind == ReferenceKind.propertyAccessor) { |
| 1886 if (!name.endsWith('=')) { | 1890 if (!name.endsWith('=')) { |
| 1887 return name + '?'; | 1891 return name + '?'; |
| 1888 } | 1892 } |
| 1889 } | 1893 } |
| 1890 return name; | 1894 return name; |
| 1891 } | 1895 } |
| 1892 } | 1896 } |
| OLD | NEW |