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

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

Issue 9558005: Implement literal maps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 9 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 | « dart/frog/leg/lib/js_helper.dart ('k') | dart/frog/leg/ssa/builder.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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 mapping[node.label] = element; 1118 mapping[node.label] = element;
1119 } else { 1119 } else {
1120 warning(node.label, MessageKind.UNUSED_LABEL, [labelName]); 1120 warning(node.label, MessageKind.UNUSED_LABEL, [labelName]);
1121 } 1121 }
1122 if (!statementElement.isBreakTarget) { 1122 if (!statementElement.isBreakTarget) {
1123 mapping.map.remove(body); 1123 mapping.map.remove(body);
1124 } 1124 }
1125 } 1125 }
1126 1126
1127 visitLiteralMap(LiteralMap node) { 1127 visitLiteralMap(LiteralMap node) {
1128 warning(node, MessageKind.GENERIC, ['map literals are not implemented']); 1128 node.visitChildren(this);
1129 } 1129 }
1130 1130
1131 visitLiteralMapEntry(LiteralMapEntry node) { 1131 visitLiteralMapEntry(LiteralMapEntry node) {
1132 unimplemented(node, 'map entry'); 1132 node.visitChildren(this);
1133 } 1133 }
1134 1134
1135 visitNamedArgument(NamedArgument node) { 1135 visitNamedArgument(NamedArgument node) {
1136 visit(node.expression); 1136 visit(node.expression);
1137 } 1137 }
1138 1138
1139 visitSwitchStatement(SwitchStatement node) { 1139 visitSwitchStatement(SwitchStatement node) {
1140 warning(node, MessageKind.GENERIC, ['switch statement is not implemented']); 1140 warning(node, MessageKind.GENERIC, ['switch statement is not implemented']);
1141 } 1141 }
1142 1142
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 class TopScope extends Scope { 1461 class TopScope extends Scope {
1462 LibraryElement get library() => element; 1462 LibraryElement get library() => element;
1463 1463
1464 TopScope(LibraryElement library) : super(null, library); 1464 TopScope(LibraryElement library) : super(null, library);
1465 Element lookup(SourceString name) => library.find(name); 1465 Element lookup(SourceString name) => library.find(name);
1466 1466
1467 Element add(Element element) { 1467 Element add(Element element) {
1468 throw "Cannot add an element in the top scope"; 1468 throw "Cannot add an element in the top scope";
1469 } 1469 }
1470 } 1470 }
OLDNEW
« no previous file with comments | « dart/frog/leg/lib/js_helper.dart ('k') | dart/frog/leg/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698