| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.analyzer.ast_builder; | 5 library fasta.analyzer.ast_builder; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory; | 8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory; |
| 9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard; | 9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard; |
| 10 import 'package:analyzer/dart/ast/token.dart' as analyzer show Token; | 10 import 'package:analyzer/dart/ast/token.dart' as analyzer show Token; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 createJumpTarget(JumpTargetKind kind, int charOffset) { | 57 createJumpTarget(JumpTargetKind kind, int charOffset) { |
| 58 // TODO(ahe): Implement jump targets. | 58 // TODO(ahe): Implement jump targets. |
| 59 return null; | 59 return null; |
| 60 } | 60 } |
| 61 | 61 |
| 62 void beginLiteralString(Token token) { | 62 void beginLiteralString(Token token) { |
| 63 debugEvent("beginLiteralString"); | 63 debugEvent("beginLiteralString"); |
| 64 push(token); | 64 push(token); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void handleNamedArgument(Token colon) { |
| 68 debugEvent("NamedArgument"); |
| 69 Expression expression = pop(); |
| 70 SimpleIdentifier name = pop(); |
| 71 push(ast.namedExpression( |
| 72 ast.label(name, toAnalyzerToken(colon)), expression)); |
| 73 } |
| 74 |
| 67 @override | 75 @override |
| 68 void handleNoConstructorReferenceContinuationAfterTypeArguments(Token token) { | 76 void handleNoConstructorReferenceContinuationAfterTypeArguments(Token token) { |
| 69 debugEvent("NoConstructorReferenceContinuationAfterTypeArguments"); | 77 debugEvent("NoConstructorReferenceContinuationAfterTypeArguments"); |
| 70 push(NullValue.ConstructorReferenceContinuationAfterTypeArguments); | 78 push(NullValue.ConstructorReferenceContinuationAfterTypeArguments); |
| 71 } | 79 } |
| 72 | 80 |
| 73 @override | 81 @override |
| 74 void endConstructorReference( | 82 void endConstructorReference( |
| 75 Token start, Token periodBeforeName, Token endToken) { | 83 Token start, Token periodBeforeName, Token endToken) { |
| 76 debugEvent("ConstructorReference"); | 84 debugEvent("ConstructorReference"); |
| (...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 } else if (identical('static', s)) { | 1801 } else if (identical('static', s)) { |
| 1794 staticKeyword = token; | 1802 staticKeyword = token; |
| 1795 } else if (identical('var', s)) { | 1803 } else if (identical('var', s)) { |
| 1796 finalConstOrVarKeyword = token; | 1804 finalConstOrVarKeyword = token; |
| 1797 } else { | 1805 } else { |
| 1798 internalError('Unhandled modifier: $s'); | 1806 internalError('Unhandled modifier: $s'); |
| 1799 } | 1807 } |
| 1800 } | 1808 } |
| 1801 } | 1809 } |
| 1802 } | 1810 } |
| OLD | NEW |