| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |