| OLD | NEW |
| 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 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 sb.add(') '); | 306 sb.add(') '); |
| 307 visit(node.body); | 307 visit(node.body); |
| 308 } | 308 } |
| 309 | 309 |
| 310 visitLabel(Label node) { | 310 visitLabel(Label node) { |
| 311 visit(node.identifier); | 311 visit(node.identifier); |
| 312 add(node.colonToken.value); | 312 add(node.colonToken.value); |
| 313 } | 313 } |
| 314 | 314 |
| 315 visitLabeledStatement(LabeledStatement node) { | 315 visitLabeledStatement(LabeledStatement node) { |
| 316 visit(node.label); | 316 visit(node.labels); |
| 317 sb.add(' '); | |
| 318 visit(node.statement); | 317 visit(node.statement); |
| 319 } | 318 } |
| 320 | 319 |
| 321 visitLiteralMap(LiteralMap node) { | 320 visitLiteralMap(LiteralMap node) { |
| 322 // TODO(ahe): handle 'const'. | 321 // TODO(ahe): handle 'const'. |
| 323 if (node.typeArguments !== null) visit(node.typeArguments); | 322 if (node.typeArguments !== null) visit(node.typeArguments); |
| 324 visit(node.entries); | 323 visit(node.entries); |
| 325 } | 324 } |
| 326 | 325 |
| 327 visitLiteralMapEntry(LiteralMapEntry node) { | 326 visitLiteralMapEntry(LiteralMapEntry node) { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 sb.add(' '); | 403 sb.add(' '); |
| 405 } | 404 } |
| 406 visit(node.name); | 405 visit(node.name); |
| 407 if (node.typeParameters !== null) { | 406 if (node.typeParameters !== null) { |
| 408 visit(node.typeParameters); | 407 visit(node.typeParameters); |
| 409 } | 408 } |
| 410 visit(node.formals); | 409 visit(node.formals); |
| 411 add(node.endToken.value); | 410 add(node.endToken.value); |
| 412 } | 411 } |
| 413 } | 412 } |
| OLD | NEW |