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

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

Issue 11418186: Issue 5359. Highlight 'on' in try-catch statement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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/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 e6104b6a5016fcbc0011096471b38bfc2c6d1435..591c54ac8bf76fc3d5462b1fa0ea15e806606167 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -5080,6 +5080,7 @@ public class DartParser extends CompletionHooksParserBase {
if (peekPseudoKeyword(0, ON_KEYWORD)) {
beginCatchClause();
next();
+ int onTokenOffset = position();
DartTypeNode exceptionType = parseTypeAnnotation();
DartParameter exception = null;
DartParameter stackTrace = null;
@@ -5106,7 +5107,7 @@ public class DartParser extends CompletionHooksParserBase {
setMetadata(exception, metadata);
}
DartBlock block = parseBlock();
- catches.add(done(new DartCatchBlock(block, exception, stackTrace)));
+ catches.add(done(new DartCatchBlock(block, onTokenOffset, exception, stackTrace)));
} else {
beginCatchClause();
next();
@@ -5139,7 +5140,7 @@ public class DartParser extends CompletionHooksParserBase {
}
expectCloseParen();
DartBlock block = parseBlock();
- catches.add(done(new DartCatchBlock(block, exception, stackTrace)));
+ catches.add(done(new DartCatchBlock(block, -1, exception, stackTrace)));
}
}

Powered by Google App Engine
This is Rietveld 408576698