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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/tree/unparser.dart

Issue 21511003: Support symbol literals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 3 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
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 part of tree; 5 part of tree;
6 6
7 String unparse(Node node) { 7 String unparse(Node node) {
8 Unparser unparser = new Unparser(); 8 Unparser unparser = new Unparser();
9 unparser.unparse(node); 9 unparser.unparse(node);
10 return unparser.result; 10 return unparser.result;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 visitStringJuxtaposition(StringJuxtaposition node) { 215 visitStringJuxtaposition(StringJuxtaposition node) {
216 visit(node.first); 216 visit(node.first);
217 sb.write(" "); 217 sb.write(" ");
218 visit(node.second); 218 visit(node.second);
219 } 219 }
220 220
221 visitLiteralNull(LiteralNull node) { 221 visitLiteralNull(LiteralNull node) {
222 add(node.token.value); 222 add(node.token.value);
223 } 223 }
224 224
225 visitLiteralSymbol(LiteralSymbol node) {
226 add(node.hashToken.value);
227 visit(node.identifiers);
228 }
229
225 visitNewExpression(NewExpression node) { 230 visitNewExpression(NewExpression node) {
226 addToken(node.newToken); 231 addToken(node.newToken);
227 visit(node.send); 232 visit(node.send);
228 } 233 }
229 234
230 visitLiteralList(LiteralList node) { 235 visitLiteralList(LiteralList node) {
231 if (node.constKeyword != null) add(node.constKeyword.value); 236 if (node.constKeyword != null) add(node.constKeyword.value);
232 visit(node.typeArguments); 237 visit(node.typeArguments);
233 visit(node.elements); 238 visit(node.elements);
234 // If list is empty, emit space after [] to disambiguate cases like []==[]. 239 // If list is empty, emit space after [] to disambiguate cases like []==[].
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 } 606 }
602 607
603 visitStatement(Statement node) { 608 visitStatement(Statement node) {
604 throw 'internal error'; // Should not be called. 609 throw 'internal error'; // Should not be called.
605 } 610 }
606 611
607 visitStringNode(StringNode node) { 612 visitStringNode(StringNode node) {
608 throw 'internal error'; // Should not be called. 613 throw 'internal error'; // Should not be called.
609 } 614 }
610 } 615 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698