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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 throw "The relativeFileUri method should be only called on subclasses " | 81 throw "The relativeFileUri method should be only called on subclasses " |
82 "which have an efficient implementation of `relativeFileUri`!"; | 82 "which have an efficient implementation of `relativeFileUri`!"; |
83 } | 83 } |
84 | 84 |
85 /// Resolve types (lookup names in scope) recorded in this builder and return | 85 /// Resolve types (lookup names in scope) recorded in this builder and return |
86 /// the number of types resolved. | 86 /// the number of types resolved. |
87 int resolveTypes(covariant Builder parent) => 0; | 87 int resolveTypes(covariant Builder parent) => 0; |
88 | 88 |
89 /// Resolve constructors (lookup names in scope) recorded in this builder and | 89 /// Resolve constructors (lookup names in scope) recorded in this builder and |
90 /// return the number of constructors resolved. | 90 /// return the number of constructors resolved. |
91 int resolveConstructors(covariant Builder parent) => 0; | 91 int resolveConstructors(LibraryBuilder parent) => 0; |
92 | 92 |
93 Builder get parent => null; | 93 Builder get parent => null; |
94 | 94 |
95 bool get isFinal => false; | 95 bool get isFinal => false; |
96 | 96 |
97 bool get isField => false; | 97 bool get isField => false; |
98 | 98 |
99 bool get isRegularMethod => false; | 99 bool get isRegularMethod => false; |
100 | 100 |
101 bool get isGetter => false; | 101 bool get isGetter => false; |
(...skipping 26 matching lines...) Expand all Loading... |
128 | 128 |
129 Uri computeLibraryUri() { | 129 Uri computeLibraryUri() { |
130 Builder builder = this; | 130 Builder builder = this; |
131 do { | 131 do { |
132 if (builder is LibraryBuilder) return builder.uri; | 132 if (builder is LibraryBuilder) return builder.uri; |
133 builder = builder.parent; | 133 builder = builder.parent; |
134 } while (builder != null); | 134 } while (builder != null); |
135 return internalError("No library parent."); | 135 return internalError("No library parent."); |
136 } | 136 } |
137 } | 137 } |
OLD | NEW |