| 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 | 4 |
| 5 library fasta.builder; | 5 library fasta.builder; |
| 6 | 6 |
| 7 import '../errors.dart' show internalError; | 7 import '../errors.dart' show internalError; |
| 8 | 8 |
| 9 export 'class_builder.dart' show ClassBuilder; | 9 export 'class_builder.dart' show ClassBuilder; |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 export 'builtin_type_builder.dart' show BuiltinTypeBuilder; | 51 export 'builtin_type_builder.dart' show BuiltinTypeBuilder; |
| 52 | 52 |
| 53 export 'dynamic_type_builder.dart' show DynamicTypeBuilder; | 53 export 'dynamic_type_builder.dart' show DynamicTypeBuilder; |
| 54 | 54 |
| 55 export 'void_type_builder.dart' show VoidTypeBuilder; | 55 export 'void_type_builder.dart' show VoidTypeBuilder; |
| 56 | 56 |
| 57 export 'function_type_builder.dart' show FunctionTypeBuilder; | 57 export 'function_type_builder.dart' show FunctionTypeBuilder; |
| 58 | 58 |
| 59 import 'library_builder.dart' show LibraryBuilder; | 59 import 'library_builder.dart' show LibraryBuilder; |
| 60 | 60 |
| 61 import 'package:front_end/src/fasta/builder/class_builder.dart' |
| 62 show ClassBuilder; |
| 63 |
| 64 import 'package:front_end/src/fasta/type_inference/type_inferrer.dart' |
| 65 show TypeInferrer; |
| 66 |
| 61 abstract class Builder { | 67 abstract class Builder { |
| 62 /// Used when multiple things with the same name are declared within the same | 68 /// Used when multiple things with the same name are declared within the same |
| 63 /// parent. Only used for declarations, not for scopes. | 69 /// parent. Only used for declarations, not for scopes. |
| 64 /// | 70 /// |
| 65 // TODO(ahe): Move to member builder or something. Then we can make | 71 // TODO(ahe): Move to member builder or something. Then we can make |
| 66 // this a const class. | 72 // this a const class. |
| 67 Builder next; | 73 Builder next; |
| 68 | 74 |
| 69 /// The values of [parent], [charOffset], and [fileUri] aren't stored. We | 75 /// The values of [parent], [charOffset], and [fileUri] aren't stored. We |
| 70 /// need to evaluate the memory impact of doing so, but want to ensure the | 76 /// need to evaluate the memory impact of doing so, but want to ensure the |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 String get fullNameForErrors; | 131 String get fullNameForErrors; |
| 126 | 132 |
| 127 Uri computeLibraryUri() { | 133 Uri computeLibraryUri() { |
| 128 Builder builder = this; | 134 Builder builder = this; |
| 129 do { | 135 do { |
| 130 if (builder is LibraryBuilder) return builder.uri; | 136 if (builder is LibraryBuilder) return builder.uri; |
| 131 builder = builder.parent; | 137 builder = builder.parent; |
| 132 } while (builder != null); | 138 } while (builder != null); |
| 133 return internalError("No library parent."); | 139 return internalError("No library parent."); |
| 134 } | 140 } |
| 141 |
| 142 void prepareInitializerInference(TypeInferrer typeInferrer, |
| 143 LibraryBuilder library, ClassBuilder currentClass) {} |
| 135 } | 144 } |
| OLD | NEW |