| 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 "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| 11 #include "vm/ast.h" | 11 #include "vm/ast.h" |
| 12 #include "vm/class_finalizer.h" | 12 #include "vm/class_finalizer.h" |
| 13 #include "vm/compiler_stats.h" | 13 #include "vm/compiler_stats.h" |
| 14 #include "vm/scanner.h" | 14 #include "vm/scanner.h" |
| 15 | 15 |
| 16 namespace dart { | 16 namespace dart { |
| 17 | 17 |
| 18 // Forward declarations. | 18 // Forward declarations. |
| 19 class Function; | 19 class Function; |
| 20 class Isolate; |
| 20 class LiteralToken; | 21 class LiteralToken; |
| 21 class Script; | 22 class Script; |
| 22 class TokenStream; | 23 class TokenStream; |
| 23 | 24 |
| 24 struct TopLevel; | 25 struct TopLevel; |
| 25 class ClassDesc; | 26 class ClassDesc; |
| 26 struct MemberDesc; | 27 struct MemberDesc; |
| 27 struct ParamList; | 28 struct ParamList; |
| 28 struct QualIdent; | 29 struct QualIdent; |
| 29 struct CatchParamDesc; | 30 struct CatchParamDesc; |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 void EnsureSavedCurrentContext(); | 616 void EnsureSavedCurrentContext(); |
| 616 AstNode* CreateAssignmentNode(AstNode* original, AstNode* rhs); | 617 AstNode* CreateAssignmentNode(AstNode* original, AstNode* rhs); |
| 617 AstNode* InsertClosureCallNodes(AstNode* condition); | 618 AstNode* InsertClosureCallNodes(AstNode* condition); |
| 618 | 619 |
| 619 ConstructorCallNode* CreateConstructorCallNode( | 620 ConstructorCallNode* CreateConstructorCallNode( |
| 620 intptr_t token_pos, | 621 intptr_t token_pos, |
| 621 const AbstractTypeArguments& type_arguments, | 622 const AbstractTypeArguments& type_arguments, |
| 622 const Function& constructor, | 623 const Function& constructor, |
| 623 ArgumentListNode* arguments); | 624 ArgumentListNode* arguments); |
| 624 | 625 |
| 626 Isolate* isolate() const { return isolate_; } |
| 627 |
| 628 Isolate* isolate_; // Cached current isolate. |
| 629 |
| 625 Script& script_; | 630 Script& script_; |
| 626 TokenStream::Iterator tokens_iterator_; | 631 TokenStream::Iterator tokens_iterator_; |
| 627 Token::Kind token_kind_; // Cached token kind for current token. | 632 Token::Kind token_kind_; // Cached token kind for current token. |
| 628 Block* current_block_; | 633 Block* current_block_; |
| 629 | 634 |
| 630 // is_top_level_ is true if parsing the "top level" of a compilation unit, | 635 // is_top_level_ is true if parsing the "top level" of a compilation unit, |
| 631 // that is class definitions, function type aliases, global functions, | 636 // that is class definitions, function type aliases, global functions, |
| 632 // global variables. | 637 // global variables. |
| 633 bool is_top_level_; | 638 bool is_top_level_; |
| 634 | 639 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 663 // code at all points in the try block where an exit from the block is | 668 // code at all points in the try block where an exit from the block is |
| 664 // done using 'return', 'break' or 'continue' statements. | 669 // done using 'return', 'break' or 'continue' statements. |
| 665 TryBlocks* try_blocks_list_; | 670 TryBlocks* try_blocks_list_; |
| 666 | 671 |
| 667 DISALLOW_COPY_AND_ASSIGN(Parser); | 672 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 668 }; | 673 }; |
| 669 | 674 |
| 670 } // namespace dart | 675 } // namespace dart |
| 671 | 676 |
| 672 #endif // VM_PARSER_H_ | 677 #endif // VM_PARSER_H_ |
| OLD | NEW |