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

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

Issue 2691613002: Improve compile-time error handling. (Closed)
Patch Set: Update status and expectations for rasta tests. Created 3 years, 10 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
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 29 matching lines...) Expand all
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) 47 LibraryBuilder(Uri fileUri)
48 : super(null, -1, fileUri); 48 : super(null, -1, fileUri);
49 49
50 Builder addBuilder(String name, Builder builder); 50 Builder addBuilder(String name, Builder builder, int charOffset);
51 51
52 void addExporter(LibraryBuilder exporter, List<Combinator> combinators, 52 void addExporter(LibraryBuilder exporter, List<Combinator> combinators,
53 int charOffset) { 53 int charOffset) {
54 exporters.add(new Export(exporter, this, combinators, charOffset)); 54 exporters.add(new Export(exporter, this, combinators, charOffset));
55 } 55 }
56 56
57 void addCompileTimeError(int charOffset, Object message) { 57 void addCompileTimeError(int charOffset, Object message, [Uri fileUri]) {
58 InputError error = new InputError(uri, charOffset, message); 58 fileUri ??= this.fileUri;
59 InputError error = new InputError(fileUri, charOffset, message);
59 compileTimeErrors.add(error); 60 compileTimeErrors.add(error);
60 print(error.format()); 61 print(error.format());
61 } 62 }
62 63
63 bool addToExportScope(String name, Builder member); 64 bool addToExportScope(String name, Builder member);
64 65
65 void addToScope(String name, Builder member); 66 void addToScope(String name, Builder member);
66 67
67 InvalidTypeBuilder buildAmbiguousBuilder( 68 InvalidTypeBuilder buildAmbiguousBuilder(
68 String name, Builder builder, Builder other, int charOffset); 69 String name, Builder builder, Builder other, int charOffset);
69 70
70 int finishStaticInvocations() => 0; 71 int finishStaticInvocations() => 0;
71 } 72 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart » ('j') | pkg/front_end/lib/src/fasta/errors.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698