| 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 | 7 import '../combinator.dart' show |
| 8 Combinator; | 8 Combinator; |
| 9 | 9 |
| 10 import '../errors.dart' show | 10 import '../errors.dart' show |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 Uri get fileUri; | 38 Uri get fileUri; |
| 39 | 39 |
| 40 Map<String, Builder> get members; | 40 Map<String, Builder> get members; |
| 41 | 41 |
| 42 // TODO(ahe): Move this to SourceLibraryBuilder. | 42 // TODO(ahe): Move this to SourceLibraryBuilder. |
| 43 Scope get scope; | 43 Scope get scope; |
| 44 | 44 |
| 45 Map<String, Builder> get exports; | 45 Map<String, Builder> get exports; |
| 46 | 46 |
| 47 LibraryBuilder(Uri fileUri) |
| 48 : super(null, -1, fileUri); |
| 49 |
| 47 Builder addBuilder(String name, Builder builder); | 50 Builder addBuilder(String name, Builder builder); |
| 48 | 51 |
| 49 void addExporter(LibraryBuilder exporter, List<Combinator> combinators) { | 52 void addExporter(LibraryBuilder exporter, List<Combinator> combinators, |
| 50 exporters.add(new Export(exporter, this, combinators)); | 53 int charOffset) { |
| 54 exporters.add(new Export(exporter, this, combinators, charOffset)); |
| 51 } | 55 } |
| 52 | 56 |
| 53 void addCompileTimeError(int charOffset, Object message) { | 57 void addCompileTimeError(int charOffset, Object message) { |
| 54 InputError error = new InputError(uri, charOffset, message); | 58 InputError error = new InputError(uri, charOffset, message); |
| 55 compileTimeErrors.add(error); | 59 compileTimeErrors.add(error); |
| 56 print(error.format()); | 60 print(error.format()); |
| 57 } | 61 } |
| 58 | 62 |
| 59 bool addToExportScope(String name, Builder member); | 63 bool addToExportScope(String name, Builder member); |
| 60 | 64 |
| 61 void addToScope(String name, Builder member); | 65 void addToScope(String name, Builder member); |
| 62 | 66 |
| 63 InvalidTypeBuilder buildAmbiguousBuilder( | 67 InvalidTypeBuilder buildAmbiguousBuilder( |
| 64 String name, Builder builder, Builder other); | 68 String name, Builder builder, Builder other, int charOffset); |
| 65 | 69 |
| 66 int finishStaticInvocations() => 0; | 70 int finishStaticInvocations() => 0; |
| 67 } | 71 } |
| OLD | NEW |