Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
index 020c80b5986d0d4f026ed9d2f6891393c835ec68..3edce3b3c1eb299814a4922a2488100a1c1edc0c 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
@@ -1508,7 +1508,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
continueTarget.resolveContinues(body); |
} |
Statement result = |
- new KernelForStatement(variables, condition, updates, body); |
+ new KernelForStatement(variables, condition, updates, body) |
+ ..fileOffset = forKeyword.charOffset; |
if (begin != null) { |
result = new KernelBlock(<Statement>[begin, result]); |
} |
@@ -2556,7 +2557,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
body = new KernelLabeledStatement(body); |
continueTarget.resolveContinues(body); |
} |
- Statement result = new KernelDoStatement(body, condition); |
+ Statement result = new KernelDoStatement(body, condition) |
+ ..fileOffset = doKeyword.charOffset; |
if (breakTarget.hasUsers) { |
result = new KernelLabeledStatement(result); |
breakTarget.resolveBreaks(result); |
@@ -2624,7 +2626,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
Statement result = new KernelForInStatement( |
variable, expression, body, declaresVariable, |
isAsync: awaitToken != null) |
- ..fileOffset = body.fileOffset; |
+ ..fileOffset = forToken.charOffset |
+ ..bodyOffset = body.fileOffset; |
if (breakTarget.hasUsers) { |
result = new KernelLabeledStatement(result); |
breakTarget.resolveBreaks(result); |
@@ -2703,7 +2706,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
body = new KernelLabeledStatement(body); |
continueTarget.resolveContinues(body); |
} |
- Statement result = new KernelWhileStatement(condition, body); |
+ Statement result = new KernelWhileStatement(condition, body) |
+ ..fileOffset = whileKeyword.charOffset; |
if (breakTarget.hasUsers) { |
result = new KernelLabeledStatement(result); |
breakTarget.resolveBreaks(result); |