Chromium Code Reviews| Index: pkg/front_end/lib/src/fasta/scope.dart |
| diff --git a/pkg/front_end/lib/src/fasta/scope.dart b/pkg/front_end/lib/src/fasta/scope.dart |
| index 2dd1656ef0bf633fb525fc4f7574981daa07c032..0910f76c847287e6b264473b58ba15ccf7174c66 100644 |
| --- a/pkg/front_end/lib/src/fasta/scope.dart |
| +++ b/pkg/front_end/lib/src/fasta/scope.dart |
| @@ -6,7 +6,7 @@ library fasta.scope; |
| import 'builder/builder.dart' show Builder, TypeVariableBuilder; |
| -import 'errors.dart' show internalError; |
| +import 'errors.dart' show InputError, internalError; |
| class MutableScope { |
| /// Names declared in this scope. |
| @@ -167,13 +167,14 @@ class Scope extends MutableScope { |
| return (labels == null ? null : labels[name]) ?? parent?.lookupLabel(name); |
| } |
| - // TODO(ahe): Rename to extend or something. |
| - void operator []=(String name, Builder member) { |
| + InputError declare( |
| + String name, Builder builder, int charOffset, Uri fileUri) { |
|
scheglov
2017/05/23 16:14:45
Please document the method and meaning of the para
ahe
2017/05/24 10:54:20
Done.
|
| if (isModifiable) { |
| local[name] = member; |
| } else { |
| internalError("Can't extend an unmodifiable scope."); |
| } |
| + return null; |
|
ahe
2017/05/23 15:04:24
Will eventually return an InputError if the name i
|
| } |
| void merge(Scope scope, |