| 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.library_builder; | 5 library fasta.library_builder; |
| 6 | 6 |
| 7 import '../combinator.dart' show Combinator; | 7 import '../combinator.dart' show Combinator; |
| 8 | 8 |
| 9 import '../errors.dart' show InputError, internalError, printUnexpected; | 9 import '../errors.dart' show InputError, internalError, printUnexpected; |
| 10 | 10 |
| 11 import '../export.dart' show Export; | 11 import '../export.dart' show Export; |
| 12 | 12 |
| 13 import '../loader.dart' show Loader; | 13 import '../loader.dart' show Loader; |
| 14 | 14 |
| 15 import '../messages.dart' show nit, warning; | 15 import '../messages.dart' show nit, warning; |
| 16 | 16 |
| 17 import '../util/relativize.dart' show relativizeUri; | 17 import '../util/relativize.dart' show relativizeUri; |
| 18 | 18 |
| 19 import 'builder.dart' show Builder, ClassBuilder, TypeBuilder; | 19 import 'builder.dart' show Builder, DynamicTypeBuilder, ClassBuilder, TypeBuilde
r, VoidTypeBuilder; |
| 20 | 20 |
| 21 import 'scope.dart' show Scope; | 21 import 'scope.dart' show Scope; |
| 22 | 22 |
| 23 abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder { | 23 abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder { |
| 24 final List<Export> exporters = <Export>[]; | 24 final List<Export> exporters = <Export>[]; |
| 25 | 25 |
| 26 final List<InputError> compileTimeErrors = <InputError>[]; | 26 final List<InputError> compileTimeErrors = <InputError>[]; |
| 27 | 27 |
| 28 LibraryBuilder partOfLibrary; | 28 LibraryBuilder partOfLibrary; |
| 29 | 29 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 111 } |
| 112 } else if (constructor.isFactory) { | 112 } else if (constructor.isFactory) { |
| 113 return constructor; | 113 return constructor; |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 throw internalError("Internal error: No constructor named" | 116 throw internalError("Internal error: No constructor named" |
| 117 " '$className::$constructorName' in '$uri'."); | 117 " '$className::$constructorName' in '$uri'."); |
| 118 } | 118 } |
| 119 | 119 |
| 120 int finishTypeVariables(ClassBuilder object) => 0; | 120 int finishTypeVariables(ClassBuilder object) => 0; |
| 121 |
| 122 void becomeCoreLibrary(dynamicType, voidType) { |
| 123 addBuilder("dynamic", new DynamicTypeBuilder<T, dynamic>(dynamicType, this,
-1), -1); |
| 124 addBuilder("void", new VoidTypeBuilder<T, dynamic>(voidType, this, -1), -1); |
| 125 } |
| 121 } | 126 } |
| OLD | NEW |