| OLD | NEW |
| 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 Loading... |
| 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)) { |
| 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 Loading... |
| 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 |
| OLD | NEW |