| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library kernel.ast_to_text; | 4 library kernel.ast_to_text; |
| 5 | 5 |
| 6 import '../ast.dart'; | 6 import '../ast.dart'; |
| 7 import '../import_table.dart'; | 7 import '../import_table.dart'; |
| 8 | 8 |
| 9 class Namer<T> { | 9 class Namer<T> { |
| 10 int index = 0; | 10 int index = 0; |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 writeExpression(node.value); | 1014 writeExpression(node.value); |
| 1015 } | 1015 } |
| 1016 | 1016 |
| 1017 visitVectorCopy(VectorCopy node) { | 1017 visitVectorCopy(VectorCopy node) { |
| 1018 writeWord('CopyVector'); | 1018 writeWord('CopyVector'); |
| 1019 writeSymbol('('); | 1019 writeSymbol('('); |
| 1020 writeExpression(node.vectorExpression); | 1020 writeExpression(node.vectorExpression); |
| 1021 writeSymbol(')'); | 1021 writeSymbol(')'); |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 visitClosureCreation(ClosureCreation node) { |
| 1025 writeWord('MakeClosure'); |
| 1026 writeSymbol('<'); |
| 1027 writeNode(node.functionType); |
| 1028 writeSymbol('>'); |
| 1029 writeSymbol('('); |
| 1030 writeMemberReference(node.topLevelFunction); |
| 1031 writeComma(); |
| 1032 writeExpression(node.contextVector); |
| 1033 writeSymbol(')'); |
| 1034 } |
| 1035 |
| 1024 visitDeferredImport(DeferredImport node) { | 1036 visitDeferredImport(DeferredImport node) { |
| 1025 write('import "'); | 1037 write('import "'); |
| 1026 write('${node.importedLibrary.importUri}'); | 1038 write('${node.importedLibrary.importUri}'); |
| 1027 write('" deferred as '); | 1039 write('" deferred as '); |
| 1028 write(node.name); | 1040 write(node.name); |
| 1029 endLine(';'); | 1041 endLine(';'); |
| 1030 } | 1042 } |
| 1031 | 1043 |
| 1032 defaultExpression(Expression node) { | 1044 defaultExpression(Expression node) { |
| 1033 writeWord('${node.runtimeType}'); | 1045 writeWord('${node.runtimeType}'); |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1600 } | 1612 } |
| 1601 throw 'illegal ProcedureKind: $kind'; | 1613 throw 'illegal ProcedureKind: $kind'; |
| 1602 } | 1614 } |
| 1603 | 1615 |
| 1604 class ExpressionPrinter { | 1616 class ExpressionPrinter { |
| 1605 final Printer writeer; | 1617 final Printer writeer; |
| 1606 final int minimumPrecedence; | 1618 final int minimumPrecedence; |
| 1607 | 1619 |
| 1608 ExpressionPrinter(this.writeer, this.minimumPrecedence); | 1620 ExpressionPrinter(this.writeer, this.minimumPrecedence); |
| 1609 } | 1621 } |
| OLD | NEW |