| Index: compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| index 6cfa314734736fef97a62ec372e9528cb7478523..ba9c4693536d4ad06584829a124e036a7d57e0c3 100644
|
| --- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| +++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| @@ -4413,8 +4413,9 @@ public class DartParser extends CompletionHooksParserBase {
|
| expect(Token.LPAREN);
|
| DartExpression condition = parseExpression();
|
| expectCloseParen();
|
| + int closeParenOffset = ctx.getTokenLocation().getBegin();
|
| DartStatement body = parseLoopStatement();
|
| - return done(new DartWhileStatement(condition, body));
|
| + return done(new DartWhileStatement(condition, closeParenOffset, body));
|
| }
|
|
|
| /**
|
| @@ -4520,9 +4521,10 @@ public class DartParser extends CompletionHooksParserBase {
|
|
|
| DartExpression iterable = parseExpression();
|
| expectCloseParen();
|
| + int closeParenOffset = ctx.getTokenLocation().getBegin();
|
|
|
| DartStatement body = parseLoopStatement();
|
| - return done(new DartForInStatement(setup, iterable, body));
|
| + return done(new DartForInStatement(setup, iterable, closeParenOffset, body));
|
|
|
| } else if (optional(Token.SEMICOLON)) {
|
|
|
| @@ -4539,9 +4541,10 @@ public class DartParser extends CompletionHooksParserBase {
|
| next = parseExpressionList();
|
| }
|
| expectCloseParen();
|
| + int closeParenOffset = ctx.getTokenLocation().getBegin();
|
|
|
| DartStatement body = parseLoopStatement();
|
| - return done(new DartForStatement(setup, condition, next, body));
|
| + return done(new DartForStatement(setup, condition, next, closeParenOffset, body));
|
| } else {
|
| reportUnexpectedToken(position(), null, peek(0));
|
| return done(parseErrorStatement());
|
| @@ -4562,7 +4565,7 @@ public class DartParser extends CompletionHooksParserBase {
|
| expect(Token.LPAREN);
|
| DartExpression condition = parseExpression();
|
| expectCloseParen();
|
| - int closeParentOffset = ctx.getTokenLocation().getBegin();
|
| + int closeParenOffset = ctx.getTokenLocation().getBegin();
|
| DartStatement yes = parseStatement();
|
| DartStatement no = null;
|
| int elseTokenOffset = 0;
|
| @@ -4570,7 +4573,7 @@ public class DartParser extends CompletionHooksParserBase {
|
| elseTokenOffset = ctx.getTokenLocation().getBegin();
|
| no = parseStatement();
|
| }
|
| - return done(new DartIfStatement(condition, closeParentOffset, yes, elseTokenOffset, no));
|
| + return done(new DartIfStatement(condition, closeParenOffset, yes, elseTokenOffset, no));
|
| }
|
|
|
| /**
|
|
|