| 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 String unparse(Node node) { | 5 String unparse(Node node) { |
| 6 Unparser unparser = new Unparser(); | 6 Unparser unparser = new Unparser(); |
| 7 unparser.unparse(node); | 7 unparser.unparse(node); |
| 8 return unparser.result; | 8 return unparser.result; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 | 511 |
| 512 visitImport(Import node) { | 512 visitImport(Import node) { |
| 513 addToken(node.importKeyword); | 513 addToken(node.importKeyword); |
| 514 visit(node.uri); | 514 visit(node.uri); |
| 515 if (node.prefix != null) { | 515 if (node.prefix != null) { |
| 516 sb.add(' '); | 516 sb.add(' '); |
| 517 addToken(node.asKeyword); | 517 addToken(node.asKeyword); |
| 518 visit(node.prefix); | 518 visit(node.prefix); |
| 519 } | 519 } |
| 520 if (node.combinators != null) { | 520 if (node.combinators != null) { |
| 521 sb.add(' '); |
| 521 visit(node.combinators); | 522 visit(node.combinators); |
| 522 } | 523 } |
| 523 add(node.getEndToken().value); | 524 add(node.getEndToken().value); |
| 524 } | 525 } |
| 525 | 526 |
| 526 visitExport(Export node) { | 527 visitExport(Export node) { |
| 527 addToken(node.exportKeyword); | 528 addToken(node.exportKeyword); |
| 528 visit(node.uri); | 529 visit(node.uri); |
| 529 if (node.combinators != null) { | 530 if (node.combinators != null) { |
| 531 sb.add(' '); |
| 530 visit(node.combinators); | 532 visit(node.combinators); |
| 531 } | 533 } |
| 532 add(node.getEndToken().value); | 534 add(node.getEndToken().value); |
| 533 } | 535 } |
| 534 | 536 |
| 535 visitPart(Part node) { | 537 visitPart(Part node) { |
| 536 addToken(node.partKeyword); | 538 addToken(node.partKeyword); |
| 537 visit(node.uri); | 539 visit(node.uri); |
| 538 add(node.getEndToken().value); | 540 add(node.getEndToken().value); |
| 539 } | 541 } |
| 540 | 542 |
| 541 visitPartOf(PartOf node) { | 543 visitPartOf(PartOf node) { |
| 542 addToken(node.partKeyword); | 544 addToken(node.partKeyword); |
| 543 addToken(node.ofKeyword); | 545 addToken(node.ofKeyword); |
| 544 visit(node.name); | 546 visit(node.name); |
| 545 add(node.getEndToken().value); | 547 add(node.getEndToken().value); |
| 546 } | 548 } |
| 549 |
| 550 visitCombinator(Combinator node) { |
| 551 addToken(node.keywordToken); |
| 552 visit(node.identifiers); |
| 553 } |
| 547 } | 554 } |
| OLD | NEW |