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

Unified Diff: pkg/analyzer/lib/src/fasta/ast_builder.dart

Issue 2898183002: Prepare for development branch by updating externally-used API. (Closed)
Patch Set: Minor tweaks found during testing. 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_fasta_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/fasta/ast_builder.dart
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 85e6241043014e0c61a35ca2336a9dd7ea812de3..8baab7cbe24322f052c5fe9e8a7ebca8114b13fd 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -416,10 +416,6 @@ class AstBuilder extends ScopeListener {
elsePart));
}
- void prepareInitializers() {
- debugEvent("prepareInitializers");
- }
-
void handleNoInitializers() {
debugEvent("NoInitializers");
push(NullValue.ConstructorInitializerSeparator);
@@ -541,8 +537,12 @@ class AstBuilder extends ScopeListener {
internalError("unhandled identifier: ${node.runtimeType}");
}
push(variable);
- scope[variable.name.name] = variable.name.staticElement =
- new AnalyzerLocalVariableElemment(variable);
+ scope.declare(
+ variable.name.name,
+ variable.name.staticElement =
+ new AnalyzerLocalVariableElemment(variable),
+ nameToken.charOffset,
+ uri);
}
void endVariablesDeclaration(int count, Token endToken) {
@@ -901,8 +901,11 @@ class AstBuilder extends ScopeListener {
}
if (name != null) {
- scope[name.name] =
- name.staticElement = new AnalyzerParameterElement(node);
+ scope.declare(
+ name.name,
+ name.staticElement = new AnalyzerParameterElement(node),
+ name.offset,
+ uri);
}
push(node);
}
@@ -948,7 +951,11 @@ class AstBuilder extends ScopeListener {
parameters: formalParameters);
}
- scope[name.name] = name.staticElement = new AnalyzerParameterElement(node);
+ scope.declare(
+ name.name,
+ name.staticElement = new AnalyzerParameterElement(node),
+ name.offset,
+ uri);
push(node);
}
@@ -1987,6 +1994,12 @@ class AstBuilder extends ScopeListener {
}
return firstToken;
}
+
+ @override
+ void addCompileTimeErrorFromMessage(FastaMessage message) {
+ library.addCompileTimeError(message.charOffset, message.message,
+ fileUri: message.uri);
+ }
}
/// Data structure placed on the stack to represent a class body.
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_fasta_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698