| 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 "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 Script& script_; | 686 Script& script_; |
| 687 TokenStream::Iterator tokens_iterator_; | 687 TokenStream::Iterator tokens_iterator_; |
| 688 Token::Kind token_kind_; // Cached token kind for current token. | 688 Token::Kind token_kind_; // Cached token kind for current token. |
| 689 Block* current_block_; | 689 Block* current_block_; |
| 690 | 690 |
| 691 // is_top_level_ is true if parsing the "top level" of a compilation unit, | 691 // is_top_level_ is true if parsing the "top level" of a compilation unit, |
| 692 // that is class definitions, function type aliases, global functions, | 692 // that is class definitions, function type aliases, global functions, |
| 693 // global variables. | 693 // global variables. |
| 694 bool is_top_level_; | 694 bool is_top_level_; |
| 695 | 695 |
| 696 // True when evaluating metadata. Used to make decisions otherwise based on | |
| 697 // the current_function(). | |
| 698 void set_parsing_metadata(bool value) { parsing_metadata_ = value; } | |
| 699 bool parsing_metadata_; | |
| 700 | |
| 701 // The member currently being parsed during "top level" parsing. | 696 // The member currently being parsed during "top level" parsing. |
| 702 MemberDesc* current_member_; | 697 MemberDesc* current_member_; |
| 703 | 698 |
| 704 // Parser mode to allow/disallow function literals. This is used in | 699 // Parser mode to allow/disallow function literals. This is used in |
| 705 // constructor initializer expressions to handle ambiguous grammar. | 700 // constructor initializer expressions to handle ambiguous grammar. |
| 706 bool SetAllowFunctionLiterals(bool value); | 701 bool SetAllowFunctionLiterals(bool value); |
| 707 bool allow_function_literals_; | 702 bool allow_function_literals_; |
| 708 | 703 |
| 709 // The function currently being compiled. | 704 // The function currently being compiled. |
| 710 ParsedFunction* parsed_function_; | 705 ParsedFunction* parsed_function_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 735 intptr_t last_used_try_index_; | 730 intptr_t last_used_try_index_; |
| 736 | 731 |
| 737 bool unregister_pending_function_; | 732 bool unregister_pending_function_; |
| 738 | 733 |
| 739 DISALLOW_COPY_AND_ASSIGN(Parser); | 734 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 740 }; | 735 }; |
| 741 | 736 |
| 742 } // namespace dart | 737 } // namespace dart |
| 743 | 738 |
| 744 #endif // VM_PARSER_H_ | 739 #endif // VM_PARSER_H_ |
| OLD | NEW |