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

Unified Diff: pkg/front_end/lib/src/fasta/scope.dart

Issue 2898183002: Prepare for development branch by updating externally-used API. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698