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

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

Issue 9283031: Build script tags. (Closed) Base URL: ssh://aaricia.aar/home/ahe/Dart/all/dart.googlecode.com.git@script
Patch Set: Address review comments Created 8 years, 11 months 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
« no previous file with comments | « dart/frog/leg/elements/elements.dart ('k') | dart/frog/leg/scanner/class_element_parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 interface TreeElements { 5 interface TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 } 7 }
8 8
9 class TreeElementMapping implements TreeElements { 9 class TreeElementMapping implements TreeElements {
10 Map<Node, Element> map; 10 Map<Node, Element> map;
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 } 801 }
802 for (Link<Node> link = node.interfaces.nodes; 802 for (Link<Node> link = node.interfaces.nodes;
803 !link.isEmpty(); 803 !link.isEmpty();
804 link = link.tail) { 804 link = link.tail) {
805 element.interfaces = element.interfaces.prepend(visit(link.head)); 805 element.interfaces = element.interfaces.prepend(visit(link.head));
806 } 806 }
807 return element.computeType(compiler); 807 return element.computeType(compiler);
808 } 808 }
809 809
810 Type visitTypeAnnotation(TypeAnnotation node) { 810 Type visitTypeAnnotation(TypeAnnotation node) {
811 Identifier name = node.typeName; 811 Identifier name = node.typeName.asIdentifier();
812 if (name === null) {
813 compiler.unimplemented("prefixes", node: node.typeName);
814 }
812 Element element = context.lookup(name.source); 815 Element element = context.lookup(name.source);
813 if (element === null) { 816 if (element === null) {
814 compiler.reportError(node, 817 compiler.reportError(node,
815 new ResolutionError(MessageKind.CANNOT_RESOLVE_TYPE, [name])); 818 new ResolutionError(MessageKind.CANNOT_RESOLVE_TYPE, [name]));
816 } else if (element.kind !== ElementKind.CLASS) { 819 } else if (element.kind !== ElementKind.CLASS) {
817 compiler.reportError(node, 820 compiler.reportError(node,
818 new ResolutionError(MessageKind.NOT_A_TYPE, [name])); 821 new ResolutionError(MessageKind.NOT_A_TYPE, [name]));
819 } else { 822 } else {
820 compiler.resolver.toResolve.add(element); 823 compiler.resolver.toResolve.add(element);
821 // TODO(ngeoffray): Use type variables. 824 // TODO(ngeoffray): Use type variables.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 class TopScope extends Scope { 1002 class TopScope extends Scope {
1000 Universe universe; 1003 Universe universe;
1001 1004
1002 TopScope(Universe this.universe) : super(null, null); 1005 TopScope(Universe this.universe) : super(null, null);
1003 Element lookup(SourceString name) => universe.find(name); 1006 Element lookup(SourceString name) => universe.find(name);
1004 1007
1005 Element add(Element element) { 1008 Element add(Element element) {
1006 throw "Cannot add an element in the top scope"; 1009 throw "Cannot add an element in the top scope";
1007 } 1010 }
1008 } 1011 }
OLDNEW
« no previous file with comments | « dart/frog/leg/elements/elements.dart ('k') | dart/frog/leg/scanner/class_element_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698