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

Unified Diff: runtime/vm/parser.cc

Issue 10911042: Fixed parsing of parameterized type test assert statement in production mode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
« no previous file with comments | « runtime/tests/vm/dart/assert_with_type_test_or_cast_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 11842)
+++ runtime/vm/parser.cc (working copy)
@@ -9336,8 +9336,18 @@
while (((min_prec <= Token::Precedence(CurrentToken())) &&
(Token::Precedence(CurrentToken()) <= max_prec)) ||
IsLiteral("as")) {
+ Token::Kind last_token = IsLiteral("as") ? Token::kAS : CurrentToken();
ConsumeToken();
- SkipUnaryExpr();
+ if (last_token == Token::kIS) {
+ if (CurrentToken() == Token::kNOT) {
+ ConsumeToken();
+ }
+ SkipType(false);
+ } else if (last_token == Token::kAS) {
+ SkipType(false);
+ } else {
+ SkipUnaryExpr();
+ }
}
}
« no previous file with comments | « runtime/tests/vm/dart/assert_with_type_test_or_cast_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698