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 #ifndef VM_PARSER_H_ | 5 #ifndef VM_PARSER_H_ |
6 #define VM_PARSER_H_ | 6 #define VM_PARSER_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 | 9 |
10 #include "vm/ast.h" | 10 #include "vm/ast.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 String& Interpolate(ArrayNode* values); | 478 String& Interpolate(ArrayNode* values); |
479 AstNode* MakeAssertCall(intptr_t begin, intptr_t end); | 479 AstNode* MakeAssertCall(intptr_t begin, intptr_t end); |
480 AstNode* ThrowTypeError(intptr_t type_pos, const AbstractType& type); | 480 AstNode* ThrowTypeError(intptr_t type_pos, const AbstractType& type); |
481 | 481 |
482 void CheckFunctionIsCallable(intptr_t token_index, const Function& function); | 482 void CheckFunctionIsCallable(intptr_t token_index, const Function& function); |
483 void CheckOperatorArity(const MemberDesc& member, Token::Kind operator_token); | 483 void CheckOperatorArity(const MemberDesc& member, Token::Kind operator_token); |
484 | 484 |
485 const LocalVariable& GetIncrementTempLocal(); | 485 const LocalVariable& GetIncrementTempLocal(); |
486 void EnsureExpressionTemp(); | 486 void EnsureExpressionTemp(); |
487 | 487 |
| 488 ConstructorCallNode* CreateConstructorCallNode( |
| 489 intptr_t token_index, |
| 490 const AbstractTypeArguments& type_arguments, |
| 491 const Function& constructor, |
| 492 ArgumentListNode* arguments); |
| 493 |
| 494 |
488 const Script& script_; | 495 const Script& script_; |
489 const TokenStream& tokens_; | 496 const TokenStream& tokens_; |
490 intptr_t token_index_; | 497 intptr_t token_index_; |
491 Token::Kind token_kind_; // Cached token kind for the token_index_. | 498 Token::Kind token_kind_; // Cached token kind for the token_index_. |
492 Block* current_block_; | 499 Block* current_block_; |
493 | 500 |
494 // is_top_level_ is true if parsing the "top level" of a compilation unit, | 501 // is_top_level_ is true if parsing the "top level" of a compilation unit, |
495 // that is interface and class definitions. | 502 // that is interface and class definitions. |
496 bool is_top_level_; | 503 bool is_top_level_; |
497 | 504 |
(...skipping 22 matching lines...) Expand all Loading... |
520 | 527 |
521 // Allocate temporary only once per function. | 528 // Allocate temporary only once per function. |
522 LocalVariable* expression_temp_; | 529 LocalVariable* expression_temp_; |
523 | 530 |
524 DISALLOW_COPY_AND_ASSIGN(Parser); | 531 DISALLOW_COPY_AND_ASSIGN(Parser); |
525 }; | 532 }; |
526 | 533 |
527 } // namespace dart | 534 } // namespace dart |
528 | 535 |
529 #endif // VM_PARSER_H_ | 536 #endif // VM_PARSER_H_ |
OLD | NEW |