| 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 import '../type_propagation/type_propagation.dart'; | 8 import '../type_propagation/type_propagation.dart'; |
| 9 | 9 |
| 10 class Namer<T> { | 10 class Namer<T> { |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 bool showOffsets; | 184 bool showOffsets; |
| 185 | 185 |
| 186 static int SPACE = 0; | 186 static int SPACE = 0; |
| 187 static int WORD = 1; | 187 static int WORD = 1; |
| 188 static int SYMBOL = 2; | 188 static int SYMBOL = 2; |
| 189 int state = SPACE; | 189 int state = SPACE; |
| 190 | 190 |
| 191 Printer(this.sink, | 191 Printer(this.sink, |
| 192 {NameSystem syntheticNames, | 192 {NameSystem syntheticNames, |
| 193 this.showExternal, | 193 this.showExternal, |
| 194 this.showOffsets, | 194 this.showOffsets: false, |
| 195 this.importTable, | 195 this.importTable, |
| 196 this.annotator: const InferredValueAnnotator()}) | 196 this.annotator: const InferredValueAnnotator()}) |
| 197 : this.syntheticNames = syntheticNames ?? new NameSystem(); | 197 : this.syntheticNames = syntheticNames ?? new NameSystem(); |
| 198 | 198 |
| 199 Printer._inner(Printer parent, this.importTable) | 199 Printer._inner(Printer parent, this.importTable) |
| 200 : sink = parent.sink, | 200 : sink = parent.sink, |
| 201 syntheticNames = parent.syntheticNames, | 201 syntheticNames = parent.syntheticNames, |
| 202 annotator = parent.annotator, | 202 annotator = parent.annotator, |
| 203 showExternal = parent.showExternal, | 203 showExternal = parent.showExternal, |
| 204 showOffsets = parent.showOffsets; | 204 showOffsets = parent.showOffsets; |
| (...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1544 } | 1544 } |
| 1545 throw 'illegal ProcedureKind: $kind'; | 1545 throw 'illegal ProcedureKind: $kind'; |
| 1546 } | 1546 } |
| 1547 | 1547 |
| 1548 class ExpressionPrinter { | 1548 class ExpressionPrinter { |
| 1549 final Printer writeer; | 1549 final Printer writeer; |
| 1550 final int minimumPrecedence; | 1550 final int minimumPrecedence; |
| 1551 | 1551 |
| 1552 ExpressionPrinter(this.writeer, this.minimumPrecedence); | 1552 ExpressionPrinter(this.writeer, this.minimumPrecedence); |
| 1553 } | 1553 } |
| OLD | NEW |