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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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' | 61 import 'package:front_end/src/fasta/builder/class_builder.dart' |
62 show ClassBuilder; | 62 show ClassBuilder; |
63 | 63 |
64 import 'package:front_end/src/fasta/type_inference/type_inferrer.dart' | 64 import 'package:front_end/src/fasta/type_inference/type_inference_engine.dart' |
65 show TypeInferrer; | 65 show TypeInferenceEngine; |
66 | 66 |
67 abstract class Builder { | 67 abstract class Builder { |
68 /// 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 |
69 /// parent. Only used for declarations, not for scopes. | 69 /// parent. Only used for declarations, not for scopes. |
70 /// | 70 /// |
71 // 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 |
72 // this a const class. | 72 // this a const class. |
73 Builder next; | 73 Builder next; |
74 | 74 |
75 /// The values of [parent], [charOffset], and [fileUri] aren't stored. We | 75 /// The values of [parent], [charOffset], and [fileUri] aren't stored. We |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 Uri computeLibraryUri() { | 133 Uri computeLibraryUri() { |
134 Builder builder = this; | 134 Builder builder = this; |
135 do { | 135 do { |
136 if (builder is LibraryBuilder) return builder.uri; | 136 if (builder is LibraryBuilder) return builder.uri; |
137 builder = builder.parent; | 137 builder = builder.parent; |
138 } while (builder != null); | 138 } while (builder != null); |
139 return internalError("No library parent."); | 139 return internalError("No library parent."); |
140 } | 140 } |
141 | 141 |
142 void prepareInitializerInference(TypeInferrer typeInferrer, | 142 void prepareInitializerInference(TypeInferenceEngine typeInferenceEngine, |
143 LibraryBuilder library, ClassBuilder currentClass) {} | 143 LibraryBuilder library, ClassBuilder currentClass) {} |
144 } | 144 } |
OLD | NEW |