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

Side by Side Diff: runtime/vm/parser.cc

Issue 9252027: Fix named parameter function calls (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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 | tests/language/src/NamedParametersTest.dart » ('j') | 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 7564 matching lines...) Expand 10 before | Expand all | Expand 10 after
7575 ConsumeToken(); 7575 ConsumeToken();
7576 } 7576 }
7577 } 7577 }
7578 ExpectToken(Token::kRBRACE); 7578 ExpectToken(Token::kRBRACE);
7579 } 7579 }
7580 7580
7581 7581
7582 void Parser::SkipActualParameters() { 7582 void Parser::SkipActualParameters() {
7583 ExpectToken(Token::kLPAREN); 7583 ExpectToken(Token::kLPAREN);
7584 while (CurrentToken() != Token::kRPAREN) { 7584 while (CurrentToken() != Token::kRPAREN) {
7585 if (IsIdentifier() && LookaheadToken(1) == Token::kCOLON) {
regis 2012/01/19 00:36:48 Please add a pair of parenthesis.
hausner 2012/01/19 00:47:33 Done.
7586 // Named actual parameter.
7587 ConsumeToken();
7588 ConsumeToken();
7589 }
7585 SkipNestedExpr(); 7590 SkipNestedExpr();
7586 if (CurrentToken() == Token::kCOMMA) { 7591 if (CurrentToken() == Token::kCOMMA) {
7587 ConsumeToken(); 7592 ConsumeToken();
7588 } 7593 }
7589 } 7594 }
7590 ExpectToken(Token::kRPAREN); 7595 ExpectToken(Token::kRPAREN);
7591 } 7596 }
7592 7597
7593 7598
7594 void Parser::SkipCompoundLiteral() { 7599 void Parser::SkipCompoundLiteral() {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
7760 } 7765 }
7761 7766
7762 7767
7763 void Parser::SkipNestedExpr() { 7768 void Parser::SkipNestedExpr() {
7764 const bool saved_mode = SetAllowFunctionLiterals(true); 7769 const bool saved_mode = SetAllowFunctionLiterals(true);
7765 SkipExpr(); 7770 SkipExpr();
7766 SetAllowFunctionLiterals(saved_mode); 7771 SetAllowFunctionLiterals(saved_mode);
7767 } 7772 }
7768 7773
7769 } // namespace dart 7774 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/language/src/NamedParametersTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698