| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 add(node.endToken.value); | 177 add(node.endToken.value); |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 visitDoWhile(DoWhile node) { | 181 visitDoWhile(DoWhile node) { |
| 182 add(node.doKeyword.value); | 182 add(node.doKeyword.value); |
| 183 sb.add(' '); | 183 sb.add(' '); |
| 184 visit(node.body); | 184 visit(node.body); |
| 185 sb.add(' '); | 185 sb.add(' '); |
| 186 add(node.whileKeyword.value); | 186 add(node.whileKeyword.value); |
| 187 sb.add(' ('); | 187 sb.add(' '); |
| 188 visit(node.condition); | 188 visit(node.condition); |
| 189 sb.add(')'); | |
| 190 sb.add(node.endToken.value); | 189 sb.add(node.endToken.value); |
| 191 } | 190 } |
| 192 | 191 |
| 193 visitWhile(While node) { | 192 visitWhile(While node) { |
| 194 add(node.whileKeyword.value); | 193 add(node.whileKeyword.value); |
| 195 sb.add(' ('); | 194 sb.add(' '); |
| 196 visit(node.condition); | 195 visit(node.condition); |
| 197 sb.add(')'); | |
| 198 sb.add(' '); | 196 sb.add(' '); |
| 199 visit(node.body); | 197 visit(node.body); |
| 200 } | 198 } |
| 199 |
| 200 visitParenthesizedExpression(ParenthesizedExpression node) { |
| 201 add(node.getBeginToken().value); |
| 202 visit(node.expression); |
| 203 add(node.getEndToken().value); |
| 204 } |
| 201 } | 205 } |
| OLD | NEW |