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

Side by Side Diff: dart/frog/leg/tree/unparser.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 Unparser implements Visitor { 5 class Unparser implements Visitor {
6 StringBuffer sb; 6 StringBuffer sb;
7 final bool printDebugInfo; 7 final bool printDebugInfo;
8 8
9 Unparser([this.printDebugInfo = false]); 9 Unparser([this.printDebugInfo = false]);
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 visit(node.condition); 222 visit(node.condition);
223 sb.add(' '); 223 sb.add(' ');
224 visit(node.body); 224 visit(node.body);
225 } 225 }
226 226
227 visitParenthesizedExpression(ParenthesizedExpression node) { 227 visitParenthesizedExpression(ParenthesizedExpression node) {
228 add(node.getBeginToken().value); 228 add(node.getBeginToken().value);
229 visit(node.expression); 229 visit(node.expression);
230 add(node.getEndToken().value); 230 add(node.getEndToken().value);
231 } 231 }
232
233 visitStringInterpolation(StringInterpolation node) {
234 visit(node.string);
235 visit(node.parts);
236 }
237
238 visitStringInterpolationPart(StringInterpolationPart node) {
239 sb.add('\${'); // TODO(ahe): Preserve the real tokens.
240 visit(node.expression);
241 sb.add('}');
242 visit(node.string);
243 }
232 } 244 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698