| 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 import '../messages.dart' show nit; | 9 import '../messages.dart' show nit; |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 export 'prefix_builder.dart' show PrefixBuilder; | 47 export 'prefix_builder.dart' show PrefixBuilder; |
| 48 | 48 |
| 49 export 'invalid_type_builder.dart' show InvalidTypeBuilder; | 49 export 'invalid_type_builder.dart' show InvalidTypeBuilder; |
| 50 | 50 |
| 51 export 'mixed_accessor.dart' show MixedAccessor; | 51 export 'mixed_accessor.dart' show MixedAccessor; |
| 52 | 52 |
| 53 export 'scope.dart' show AccessErrorBuilder; | 53 export 'scope.dart' show AccessErrorBuilder; |
| 54 | 54 |
| 55 export 'dynamic_type_builder.dart' show DynamicTypeBuilder; | 55 export 'dynamic_type_builder.dart' show DynamicTypeBuilder; |
| 56 | 56 |
| 57 export 'function_type_builder.dart' show FunctionTypeBuilder; |
| 58 |
| 57 import 'library_builder.dart' show LibraryBuilder; | 59 import 'library_builder.dart' show LibraryBuilder; |
| 58 | 60 |
| 59 abstract class Builder { | 61 abstract class Builder { |
| 60 /// Used when multiple things with the same name are declared within the same | 62 /// Used when multiple things with the same name are declared within the same |
| 61 /// parent. Only used for declarations, not for scopes. | 63 /// parent. Only used for declarations, not for scopes. |
| 62 /// | 64 /// |
| 63 // TODO(ahe): Move to member builder or something. Then we can make | 65 // TODO(ahe): Move to member builder or something. Then we can make |
| 64 // this a const class. | 66 // this a const class. |
| 65 Builder next; | 67 Builder next; |
| 66 | 68 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 167 |
| 166 static Uri getUri(Builder builder) { | 168 static Uri getUri(Builder builder) { |
| 167 if (builder == null) return internalError("Builder is null."); | 169 if (builder == null) return internalError("Builder is null."); |
| 168 while (builder != null) { | 170 while (builder != null) { |
| 169 if (builder is LibraryBuilder) return builder.uri; | 171 if (builder is LibraryBuilder) return builder.uri; |
| 170 builder = builder.parent; | 172 builder = builder.parent; |
| 171 } | 173 } |
| 172 return internalError("No library parent."); | 174 return internalError("No library parent."); |
| 173 } | 175 } |
| 174 } | 176 } |
| OLD | NEW |