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

Unified Diff: lib/compiler/implementation/scanner/parser.dart

Issue 10041020: Fix bugs in cascade implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months 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
« frog/tests/leg_only/leg_only.status ('K') | « frog/tests/leg_only/leg_only.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/scanner/parser.dart
diff --git a/lib/compiler/implementation/scanner/parser.dart b/lib/compiler/implementation/scanner/parser.dart
index 3659db5752083be5d044b51c2f33c9d7c5d70322..00ccaa2c81acea9ec55bbd237cfd4ee3a4da6b81 100644
--- a/lib/compiler/implementation/scanner/parser.dart
+++ b/lib/compiler/implementation/scanner/parser.dart
@@ -924,6 +924,7 @@ class Parser {
listener.beginCascade(token);
assert(optional('..', token));
Token cascadeOperator = token;
+ token = token.next;
if (optional('[', token)) {
token = parseArgumentOrIndexStar(token);
} else if (isIdentifier(token)) {
@@ -937,7 +938,7 @@ class Parser {
mark = token;
if (optional('.', token)) {
Token period = token;
- token = parseSend(token);
+ token = parseSend(token.next);
listener.handleBinaryExpression(period);
}
token = parseArgumentOrIndexStar(token);
@@ -945,7 +946,7 @@ class Parser {
if (token.info.precedence === ASSIGNMENT_PRECEDENCE) {
Token assignment = token;
- token = parsePrecedenceExpression(token, CASCADE_PRECEDENCE + 1);
+ token = parsePrecedenceExpression(token.next, CASCADE_PRECEDENCE + 1);
listener.handleAssignmentExpression(assignment);
}
listener.endCascade();
« frog/tests/leg_only/leg_only.status ('K') | « frog/tests/leg_only/leg_only.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698