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

Unified Diff: compiler/java/com/google/dart/compiler/parser/DartScannerParserContext.java

Issue 8774024: Parse method names that include type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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
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);
}
}

Powered by Google App Engine
This is Rietveld 408576698