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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 9325 matching lines...) Expand 10 before | Expand all | Expand 10 after
9336 } 9336 }
9337 9337
9338 9338
9339 void Parser::SkipBinaryExpr() { 9339 void Parser::SkipBinaryExpr() {
9340 SkipUnaryExpr(); 9340 SkipUnaryExpr();
9341 const int min_prec = Token::Precedence(Token::kOR); 9341 const int min_prec = Token::Precedence(Token::kOR);
9342 const int max_prec = Token::Precedence(Token::kMUL); 9342 const int max_prec = Token::Precedence(Token::kMUL);
9343 while (((min_prec <= Token::Precedence(CurrentToken())) && 9343 while (((min_prec <= Token::Precedence(CurrentToken())) &&
9344 (Token::Precedence(CurrentToken()) <= max_prec)) || 9344 (Token::Precedence(CurrentToken()) <= max_prec)) ||
9345 IsLiteral("as")) { 9345 IsLiteral("as")) {
9346 ConsumeToken(); 9346 if (CurrentToken() == Token::kIS) {
hausner 2012/08/31 23:31:35 I think there is another bug here. After the keywo
9347 SkipUnaryExpr(); 9347 ConsumeToken();
9348 if (CurrentToken() == Token::kNOT) {
9349 ConsumeToken();
9350 }
9351 SkipType(false);
9352 } else {
9353 ConsumeToken();
9354 SkipUnaryExpr();
9355 }
9348 } 9356 }
9349 } 9357 }
9350 9358
9351 9359
9352 void Parser::SkipConditionalExpr() { 9360 void Parser::SkipConditionalExpr() {
9353 SkipBinaryExpr(); 9361 SkipBinaryExpr();
9354 if (CurrentToken() == Token::kCONDITIONAL) { 9362 if (CurrentToken() == Token::kCONDITIONAL) {
9355 ConsumeToken(); 9363 ConsumeToken();
9356 SkipExpr(); 9364 SkipExpr();
9357 ExpectToken(Token::kCOLON); 9365 ExpectToken(Token::kCOLON);
(...skipping 24 matching lines...) Expand all
9382 void Parser::SkipQualIdent() { 9390 void Parser::SkipQualIdent() {
9383 ASSERT(IsIdentifier()); 9391 ASSERT(IsIdentifier());
9384 ConsumeToken(); 9392 ConsumeToken();
9385 if (CurrentToken() == Token::kPERIOD) { 9393 if (CurrentToken() == Token::kPERIOD) {
9386 ConsumeToken(); // Consume the kPERIOD token. 9394 ConsumeToken(); // Consume the kPERIOD token.
9387 ExpectIdentifier("identifier expected after '.'"); 9395 ExpectIdentifier("identifier expected after '.'");
9388 } 9396 }
9389 } 9397 }
9390 9398
9391 } // namespace dart 9399 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698