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.scope; | 5 library fasta.scope; |
6 | 6 |
7 import 'builder.dart' show Builder, MixedAccessor; | 7 import 'builder/builder.dart' show Builder, MixedAccessor; |
8 | 8 |
9 import '../errors.dart' show internalError; | 9 import 'errors.dart' show internalError; |
10 | 10 |
11 class Scope { | 11 class Scope { |
12 /// Names declared in this scope. | 12 /// Names declared in this scope. |
13 final Map<String, Builder> local; | 13 final Map<String, Builder> local; |
14 | 14 |
15 /// The scope that this scope is nested within, or `null` if this is the top | 15 /// The scope that this scope is nested within, or `null` if this is the top |
16 /// level scope. | 16 /// level scope. |
17 final Scope parent; | 17 final Scope parent; |
18 | 18 |
19 /// Indicates whether an attempt to declare new names in this scope should | 19 /// Indicates whether an attempt to declare new names in this scope should |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 String get message => "Access error: '$name'."; | 182 String get message => "Access error: '$name'."; |
183 } | 183 } |
184 | 184 |
185 class AmbiguousBuilder extends ProblemBuilder { | 185 class AmbiguousBuilder extends ProblemBuilder { |
186 AmbiguousBuilder(String name, Builder builder, int charOffset, Uri fileUri) | 186 AmbiguousBuilder(String name, Builder builder, int charOffset, Uri fileUri) |
187 : super(name, builder, charOffset, fileUri); | 187 : super(name, builder, charOffset, fileUri); |
188 | 188 |
189 String get message => "Duplicated named: '$name'."; | 189 String get message => "Duplicated named: '$name'."; |
190 } | 190 } |
OLD | NEW |