| 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 Script& script_; | 766 Script& script_; |
| 767 TokenStream::Iterator tokens_iterator_; | 767 TokenStream::Iterator tokens_iterator_; |
| 768 Token::Kind token_kind_; // Cached token kind for current token. | 768 Token::Kind token_kind_; // Cached token kind for current token. |
| 769 Block* current_block_; | 769 Block* current_block_; |
| 770 | 770 |
| 771 // is_top_level_ is true if parsing the "top level" of a compilation unit, | 771 // is_top_level_ is true if parsing the "top level" of a compilation unit, |
| 772 // that is class definitions, function type aliases, global functions, | 772 // that is class definitions, function type aliases, global functions, |
| 773 // global variables. | 773 // global variables. |
| 774 bool is_top_level_; | 774 bool is_top_level_; |
| 775 | 775 |
| 776 // await_is_keyword_ is true if we are parsing an async function. In this | |
| 777 // context async is not treated as identifier but as a keyword. | |
| 778 bool await_is_keyword_; | |
| 779 | |
| 780 // The member currently being parsed during "top level" parsing. | 776 // The member currently being parsed during "top level" parsing. |
| 781 MemberDesc* current_member_; | 777 MemberDesc* current_member_; |
| 782 | 778 |
| 783 // Parser mode to allow/disallow function literals. This is used in | 779 // Parser mode to allow/disallow function literals. This is used in |
| 784 // constructor initializer expressions to handle ambiguous grammar. | 780 // constructor initializer expressions to handle ambiguous grammar. |
| 785 bool SetAllowFunctionLiterals(bool value); | 781 bool SetAllowFunctionLiterals(bool value); |
| 786 bool allow_function_literals_; | 782 bool allow_function_literals_; |
| 787 | 783 |
| 788 // The function currently being compiled. | 784 // The function currently being compiled. |
| 789 ParsedFunction* parsed_function_; | 785 ParsedFunction* parsed_function_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 815 int16_t last_used_try_index_; | 811 int16_t last_used_try_index_; |
| 816 | 812 |
| 817 bool unregister_pending_function_; | 813 bool unregister_pending_function_; |
| 818 | 814 |
| 819 DISALLOW_COPY_AND_ASSIGN(Parser); | 815 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 820 }; | 816 }; |
| 821 | 817 |
| 822 } // namespace dart | 818 } // namespace dart |
| 823 | 819 |
| 824 #endif // VM_PARSER_H_ | 820 #endif // VM_PARSER_H_ |
| OLD | NEW |