Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: pkg/fasta/lib/src/builder/library_builder.dart

Issue 2629063005: Fasta builders. (Closed)
Patch Set: Address review comments. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library fasta.library_builder;
6
7 import '../combinator.dart' show
8 Combinator;
9
10 import '../errors.dart' show
11 InputError;
12
13 import '../export.dart' show
14 Export;
15
16 import '../loader.dart' show
17 Loader;
18
19 import 'builder.dart' show
20 Builder,
21 InvalidTypeBuilder,
22 TypeBuilder;
23
24 import 'scope.dart' show
25 Scope;
26
27 abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder {
28 final List<Export> exporters = <Export>[];
29
30 final List<InputError> compileTimeErrors = <InputError>[];
31
32 LibraryBuilder partOfLibrary;
33
34 Loader get loader;
35
36 Uri get uri;
37
38 Map<String, Builder> get members;
39
40 // TODO(ahe): Move this to SourceLibraryBuilder.
41 Scope get scope;
42
43 Map<String, Builder> get exports;
44
45 Builder addBuilder(String name, Builder builder);
46
47 void addExporter(LibraryBuilder exporter, List<Combinator> combinators) {
48 exporters.add(new Export(exporter, this, combinators));
49 }
50
51 void addCompileTimeError(int charOffset, Object message) {
52 InputError error = new InputError(uri, charOffset, message);
53 compileTimeErrors.add(error);
54 print(error.format());
55 }
56
57 bool addToExportScope(String name, Builder member);
58
59 void addToScope(String name, Builder member);
60
61 InvalidTypeBuilder buildAmbiguousBuilder(
62 String name, Builder builder, Builder other);
63
64 int finishStaticInvocations() => 0;
65 }
OLDNEW
« no previous file with comments | « pkg/fasta/lib/src/builder/invalid_type_builder.dart ('k') | pkg/fasta/lib/src/builder/member_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698