Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: dart/frog/leg/resolver.dart

Issue 8993009: Implement string interpolation up to SSA. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698