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

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

Issue 2691523002: Ensure locations are always provided, but don't store them yet. (Closed)
Patch Set: Address comments. Created 3 years, 10 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/front_end/lib/src/fasta/analyzer/element_store.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart b/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
index d7e43c2177a1752bfca74caa8f91cfb97a7a644b..505af9fd2148c8aefcb4caa4bba30addb74691b3 100644
--- a/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
+++ b/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart
@@ -66,9 +66,9 @@ class AstBuilder extends ScopeListener {
AstBuilder(this.library, this.member, this.elementStore, Scope scope)
: super(scope);
- Uri get uri => library.uri;
+ Uri get uri => library.fileUri ?? library.uri;
- createJumpTarget(JumpTargetKind kind) {
+ createJumpTarget(JumpTargetKind kind, int charOffset) {
// TODO(ahe): Implement jump targets.
return null;
}
@@ -142,7 +142,7 @@ class AstBuilder extends ScopeListener {
String name = token.value;
SimpleIdentifier identifier = ast.simpleIdentifier(toAnalyzerToken(token));
if (isFirstIdentifier) {
- Builder builder = scope.lookup(name);
+ Builder builder = scope.lookup(name, token.charOffset, uri);
if (builder != null) {
Element element = elementStore[builder];
assert(element != null);
@@ -445,7 +445,7 @@ class AstBuilder extends ScopeListener {
SimpleIdentifier name = pop();
KernelClassElement cls = name.staticElement;
if (cls == null) {
- Builder builder = scope.lookup(name.name);
+ Builder builder = scope.lookup(name.name, beginToken.charOffset, uri);
if (builder == null) {
internalError("Undefined name: $name");
}
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/analyzer/element_store.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698