| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 return null; | 425 return null; |
| 426 } | 426 } |
| 427 | 427 |
| 428 visitLiteralList(LiteralList node) { | 428 visitLiteralList(LiteralList node) { |
| 429 visit(node.elements); | 429 visit(node.elements); |
| 430 } | 430 } |
| 431 | 431 |
| 432 visitConditional(Conditional node) { | 432 visitConditional(Conditional node) { |
| 433 node.visitChildren(this); | 433 node.visitChildren(this); |
| 434 } | 434 } |
| 435 |
| 436 visitStringInterpolation(StringInterpolation node) { |
| 437 node.visitChildren(this); |
| 438 } |
| 439 |
| 440 visitStringInterpolationPart(StringInterpolationPart node) { |
| 441 node.visitChildren(this); |
| 442 } |
| 435 } | 443 } |
| 436 | 444 |
| 437 class ClassResolverVisitor extends AbstractVisitor<Type> { | 445 class ClassResolverVisitor extends AbstractVisitor<Type> { |
| 438 Compiler compiler; | 446 Compiler compiler; |
| 439 Scope context; | 447 Scope context; |
| 440 | 448 |
| 441 ClassResolverVisitor(Compiler compiler) | 449 ClassResolverVisitor(Compiler compiler) |
| 442 : this.compiler = compiler, context = new TopScope(compiler.universe); | 450 : this.compiler = compiler, context = new TopScope(compiler.universe); |
| 443 | 451 |
| 444 Type visitClassNode(ClassNode node) { | 452 Type visitClassNode(ClassNode node) { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 class TopScope extends Scope { | 604 class TopScope extends Scope { |
| 597 Universe universe; | 605 Universe universe; |
| 598 | 606 |
| 599 TopScope(Universe this.universe) : super(null, null); | 607 TopScope(Universe this.universe) : super(null, null); |
| 600 Element lookup(SourceString name) => universe.find(name); | 608 Element lookup(SourceString name) => universe.find(name); |
| 601 | 609 |
| 602 Element add(Element element) { | 610 Element add(Element element) { |
| 603 throw "Cannot add an element in the top scope"; | 611 throw "Cannot add an element in the top scope"; |
| 604 } | 612 } |
| 605 } | 613 } |
| OLD | NEW |