| 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 part of js; | 5 part of js; |
| 6 | 6 |
| 7 class TemplateManager { | 7 class TemplateManager { |
| 8 Map<String, Template> expressionTemplates = new Map<String, Template>(); | 8 Map<String, Template> expressionTemplates = new Map<String, Template>(); |
| 9 Map<String, Template> statementTemplates = new Map<String, Template>(); | 9 Map<String, Template> statementTemplates = new Map<String, Template>(); |
| 10 | 10 |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 return (arguments) { | 447 return (arguments) { |
| 448 List<VariableInitialization> declarations = <VariableInitialization>[]; | 448 List<VariableInitialization> declarations = <VariableInitialization>[]; |
| 449 for (Instantiator instantiator in declarationMakers) { | 449 for (Instantiator instantiator in declarationMakers) { |
| 450 var result = instantiator(arguments); | 450 var result = instantiator(arguments); |
| 451 declarations.add(result); | 451 declarations.add(result); |
| 452 } | 452 } |
| 453 return new VariableDeclarationList(declarations); | 453 return new VariableDeclarationList(declarations); |
| 454 }; | 454 }; |
| 455 } | 455 } |
| 456 | 456 |
| 457 Instantiator visitSequence(Sequence node) => TODO('visitSequence'); | |
| 458 | |
| 459 Instantiator visitAssignment(Assignment node) { | 457 Instantiator visitAssignment(Assignment node) { |
| 460 Instantiator makeLeftHandSide = visit(node.leftHandSide); | 458 Instantiator makeLeftHandSide = visit(node.leftHandSide); |
| 461 String op = node.op; | 459 String op = node.op; |
| 462 Instantiator makeValue = visitNullable(node.value); | 460 Instantiator makeValue = visitNullable(node.value); |
| 463 return (arguments) { | 461 return (arguments) { |
| 464 return new Assignment.compound( | 462 return new Assignment.compound( |
| 465 makeLeftHandSide(arguments), | 463 makeLeftHandSide(arguments), |
| 466 op, | 464 op, |
| 467 makeValue(arguments)); | 465 makeValue(arguments)); |
| 468 }; | 466 }; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 if (count != before) containsInterpolatedNode.add(node); | 665 if (count != before) containsInterpolatedNode.add(node); |
| 668 return null; | 666 return null; |
| 669 } | 667 } |
| 670 | 668 |
| 671 visitInterpolatedNode(InterpolatedNode node) { | 669 visitInterpolatedNode(InterpolatedNode node) { |
| 672 interpolatedNodes.add(node); | 670 interpolatedNodes.add(node); |
| 673 containsInterpolatedNode.add(node); | 671 containsInterpolatedNode.add(node); |
| 674 ++count; | 672 ++count; |
| 675 } | 673 } |
| 676 } | 674 } |
| OLD | NEW |