| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 pop(); // Token. | 268 pop(); // Token. |
| 269 receiver.cascadeSections.add(expression); | 269 receiver.cascadeSections.add(expression); |
| 270 push(receiver); | 270 push(receiver); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void handleOperator(Token token) { | 273 void handleOperator(Token token) { |
| 274 debugEvent("Operator"); | 274 debugEvent("Operator"); |
| 275 push(toAnalyzerToken(token)); | 275 push(toAnalyzerToken(token)); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void handleSymbolVoid(Token token) { |
| 279 debugEvent("SymbolVoid"); |
| 280 push(toAnalyzerToken(token)); |
| 281 } |
| 282 |
| 278 void handleBinaryExpression(Token token) { | 283 void handleBinaryExpression(Token token) { |
| 279 debugEvent("BinaryExpression"); | 284 debugEvent("BinaryExpression"); |
| 280 if (identical(".", token.stringValue) || | 285 if (identical(".", token.stringValue) || |
| 281 identical("?.", token.stringValue) || | 286 identical("?.", token.stringValue) || |
| 282 identical("..", token.stringValue)) { | 287 identical("..", token.stringValue)) { |
| 283 doDotExpression(token); | 288 doDotExpression(token); |
| 284 } else { | 289 } else { |
| 285 Expression right = pop(); | 290 Expression right = pop(); |
| 286 Expression left = pop(); | 291 Expression left = pop(); |
| 287 push(ast.binaryExpression(left, toAnalyzerToken(token), right)); | 292 push(ast.binaryExpression(left, toAnalyzerToken(token), right)); |
| (...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1456 } else if (identical('static', s)) { | 1461 } else if (identical('static', s)) { |
| 1457 staticKeyword = token; | 1462 staticKeyword = token; |
| 1458 } else if (identical('var', s)) { | 1463 } else if (identical('var', s)) { |
| 1459 finalConstOrVarKeyword = token; | 1464 finalConstOrVarKeyword = token; |
| 1460 } else { | 1465 } else { |
| 1461 internalError('Unhandled modifier: $s'); | 1466 internalError('Unhandled modifier: $s'); |
| 1462 } | 1467 } |
| 1463 } | 1468 } |
| 1464 } | 1469 } |
| 1465 } | 1470 } |
| OLD | NEW |