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

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

Issue 9380006: Support is!. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/frog/leg/scanner/listener.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 } 8 }
9 9
10 class TreeElementMapping implements TreeElements { 10 class TreeElementMapping implements TreeElements {
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 target = prefix.library.lookupLocalMember(name); 573 target = prefix.library.lookupLocalMember(name);
574 if (target == null) { 574 if (target == null) {
575 error(node, MessageKind.NO_SUCH_LIBRARY_MEMBER, 575 error(node, MessageKind.NO_SUCH_LIBRARY_MEMBER,
576 [resolvedReceiver.name, name]); 576 [resolvedReceiver.name, name]);
577 } 577 }
578 } 578 }
579 } 579 }
580 return target; 580 return target;
581 } 581 }
582 582
583 resolveTypeTest(TypeAnnotation node) { 583 resolveTypeTest(Node argument) {
584 TypeAnnotation node = argument.asTypeAnnotation();
585 if (node == null) {
586 node = argument.asSend().receiver;
587 }
584 resolveTypeRequired(node); 588 resolveTypeRequired(node);
585 } 589 }
586 590
587 void handleArguments(Send node) { 591 void handleArguments(Send node) {
588 int count = 0; 592 int count = 0;
589 List<SourceString> namedArguments = <SourceString>[]; 593 List<SourceString> namedArguments = <SourceString>[];
590 for (Link<Node> link = node.argumentsNode.nodes; 594 for (Link<Node> link = node.argumentsNode.nodes;
591 !link.isEmpty(); 595 !link.isEmpty();
592 link = link.tail) { 596 link = link.tail) {
593 count++; 597 count++;
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 class TopScope extends Scope { 1154 class TopScope extends Scope {
1151 LibraryElement get library() => element; 1155 LibraryElement get library() => element;
1152 1156
1153 TopScope(LibraryElement library) : super(null, library); 1157 TopScope(LibraryElement library) : super(null, library);
1154 Element lookup(SourceString name) => library.find(name); 1158 Element lookup(SourceString name) => library.find(name);
1155 1159
1156 Element add(Element element) { 1160 Element add(Element element) {
1157 throw "Cannot add an element in the top scope"; 1161 throw "Cannot add an element in the top scope";
1158 } 1162 }
1159 } 1163 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698