Chromium Code Reviews| Index: compiler/java/com/google/dart/compiler/parser/DartScannerParserContext.java |
| diff --git a/compiler/java/com/google/dart/compiler/parser/DartScannerParserContext.java b/compiler/java/com/google/dart/compiler/parser/DartScannerParserContext.java |
| index 63ad50b9004aafd98da275476c6fc1853a493be3..cdd00cb3a5d512313d798ad5ee06194cec93ddde 100644 |
| --- a/compiler/java/com/google/dart/compiler/parser/DartScannerParserContext.java |
| +++ b/compiler/java/com/google/dart/compiler/parser/DartScannerParserContext.java |
| @@ -86,7 +86,7 @@ public class DartScannerParserContext implements ParserContext { |
| /** |
| * Set the source position on a result, if it is a {@link HasSourceInfo}. |
| - * |
| + * |
| * @param <T> result type |
| * @param result |
| * @param startPos |
| @@ -144,7 +144,8 @@ public class DartScannerParserContext implements ParserContext { |
| // Restore the replaced tokens to their state. |
| if (oldState.rollbackTokens != null) { |
| - for (State.RollbackToken token : oldState.rollbackTokens) { |
| + while (!oldState.rollbackTokens.isEmpty()) { |
| + State.RollbackToken token = oldState.rollbackTokens.pop(); |
|
zundel
2011/12/01 23:45:54
Found a bug in this logic when rolling back >>> pa
codefu
2011/12/02 13:51:21
Thanks for catching this!
|
| scanner.setAbsolutePeek(token.absoluteOffset, token.replacedToken); |
| } |
| } |