Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: runtime/vm/parser.h

Issue 508643004: Fix scope/context behavior in await transformer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: addressed comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
776 // The member currently being parsed during "top level" parsing. 780 // The member currently being parsed during "top level" parsing.
777 MemberDesc* current_member_; 781 MemberDesc* current_member_;
778 782
779 // Parser mode to allow/disallow function literals. This is used in 783 // Parser mode to allow/disallow function literals. This is used in
780 // constructor initializer expressions to handle ambiguous grammar. 784 // constructor initializer expressions to handle ambiguous grammar.
781 bool SetAllowFunctionLiterals(bool value); 785 bool SetAllowFunctionLiterals(bool value);
782 bool allow_function_literals_; 786 bool allow_function_literals_;
783 787
784 // The function currently being compiled. 788 // The function currently being compiled.
785 ParsedFunction* parsed_function_; 789 ParsedFunction* parsed_function_;
(...skipping 25 matching lines...) Expand all
811 int16_t last_used_try_index_; 815 int16_t last_used_try_index_;
812 816
813 bool unregister_pending_function_; 817 bool unregister_pending_function_;
814 818
815 DISALLOW_COPY_AND_ASSIGN(Parser); 819 DISALLOW_COPY_AND_ASSIGN(Parser);
816 }; 820 };
817 821
818 } // namespace dart 822 } // namespace dart
819 823
820 #endif // VM_PARSER_H_ 824 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698