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

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

Issue 2788153002: Create separate scopes for constructors, setters, and other members. (Closed)
Patch Set: Update subpackage dependencies. Created 3 years, 8 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.prefix_builder; 5 library fasta.prefix_builder;
6 6
7 import 'builder.dart' show Builder, LibraryBuilder; 7 import 'builder.dart' show Builder, LibraryBuilder, Scope;
8 8
9 class PrefixBuilder extends Builder { 9 class PrefixBuilder extends Builder {
10 final String name; 10 final String name;
11 11
12 final Map<String, Builder> exports; 12 final Scope exports = new Scope.top();
13 13
14 final LibraryBuilder parent; 14 final LibraryBuilder parent;
15 15
16 PrefixBuilder(this.name, this.exports, LibraryBuilder parent, int charOffset) 16 PrefixBuilder(this.name, LibraryBuilder parent, int charOffset)
17 : parent = parent, 17 : parent = parent,
18 super(parent, charOffset, parent.fileUri); 18 super(parent, charOffset, parent.fileUri);
19 19
20 Builder lookup(String name, int charOffset, Uri fileUri) { 20 Builder lookup(String name, int charOffset, Uri fileUri) {
21 return exports[name]; 21 return exports.lookup(name, charOffset, fileUri);
22 } 22 }
23 23
24 @override 24 @override
25 String get fullNameForErrors => name; 25 String get fullNameForErrors => name;
26 } 26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698