| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 class TreeElements { | 5 class TreeElements { |
| 6 Map<Node, Element> map; | 6 Map<Node, Element> map; |
| 7 TreeElements() : map = new LinkedHashMap<Node, Element>(); | 7 TreeElements() : map = new LinkedHashMap<Node, Element>(); |
| 8 operator []=(Node node, Element element) => map[node] = element; | 8 operator []=(Node node, Element element) => map[node] = element; |
| 9 operator [](Node node) => map[node]; | 9 operator [](Node node) => map[node]; |
| 10 } | 10 } |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 cancel(node, "Unimplemented"); | 431 cancel(node, "Unimplemented"); |
| 432 } | 432 } |
| 433 | 433 |
| 434 visitLiteralList(LiteralList node) { | 434 visitLiteralList(LiteralList node) { |
| 435 visit(node.elements); | 435 visit(node.elements); |
| 436 } | 436 } |
| 437 | 437 |
| 438 visitConditional(Conditional node) { | 438 visitConditional(Conditional node) { |
| 439 node.visitChildren(this); | 439 node.visitChildren(this); |
| 440 } | 440 } |
| 441 |
| 442 visitStringInterpolation(StringInterpolation node) { |
| 443 node.visitChildren(this); |
| 444 } |
| 445 |
| 446 visitStringInterpolationPart(StringInterpolationPart node) { |
| 447 node.visitChildren(this); |
| 448 } |
| 441 } | 449 } |
| 442 | 450 |
| 443 class ClassResolverVisitor extends AbstractVisitor<Type> { | 451 class ClassResolverVisitor extends AbstractVisitor<Type> { |
| 444 Compiler compiler; | 452 Compiler compiler; |
| 445 Scope context; | 453 Scope context; |
| 446 | 454 |
| 447 ClassResolverVisitor(Compiler compiler) | 455 ClassResolverVisitor(Compiler compiler) |
| 448 : this.compiler = compiler, context = new TopScope(compiler.universe); | 456 : this.compiler = compiler, context = new TopScope(compiler.universe); |
| 449 | 457 |
| 450 Type visitClassNode(ClassNode node) { | 458 Type visitClassNode(ClassNode node) { |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 class TopScope extends Scope { | 612 class TopScope extends Scope { |
| 605 Universe universe; | 613 Universe universe; |
| 606 | 614 |
| 607 TopScope(Universe this.universe) : super(null, null); | 615 TopScope(Universe this.universe) : super(null, null); |
| 608 Element lookup(SourceString name) => universe.find(name); | 616 Element lookup(SourceString name) => universe.find(name); |
| 609 | 617 |
| 610 Element add(Element element) { | 618 Element add(Element element) { |
| 611 throw "Cannot add an element in the top scope"; | 619 throw "Cannot add an element in the top scope"; |
| 612 } | 620 } |
| 613 } | 621 } |
| OLD | NEW |