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

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: add await_is_keyword_ indicator to parser 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
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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 Script& script_; 763 Script& script_;
764 TokenStream::Iterator tokens_iterator_; 764 TokenStream::Iterator tokens_iterator_;
765 Token::Kind token_kind_; // Cached token kind for current token. 765 Token::Kind token_kind_; // Cached token kind for current token.
766 Block* current_block_; 766 Block* current_block_;
767 767
768 // is_top_level_ is true if parsing the "top level" of a compilation unit, 768 // is_top_level_ is true if parsing the "top level" of a compilation unit,
769 // that is class definitions, function type aliases, global functions, 769 // that is class definitions, function type aliases, global functions,
770 // global variables. 770 // global variables.
771 bool is_top_level_; 771 bool is_top_level_;
772 772
773 // await_is_keyword_ is true if we are parsing an async function. In this
774 // context async is not treated as identifier but as primary.
hausner 2014/08/26 22:48:06 as a keyword.
Michael Lippautz (Google) 2014/08/26 23:01:44 Done.
775 bool await_is_keyword_;
776
773 // The member currently being parsed during "top level" parsing. 777 // The member currently being parsed during "top level" parsing.
774 MemberDesc* current_member_; 778 MemberDesc* current_member_;
775 779
776 // Parser mode to allow/disallow function literals. This is used in 780 // Parser mode to allow/disallow function literals. This is used in
777 // constructor initializer expressions to handle ambiguous grammar. 781 // constructor initializer expressions to handle ambiguous grammar.
778 bool SetAllowFunctionLiterals(bool value); 782 bool SetAllowFunctionLiterals(bool value);
779 bool allow_function_literals_; 783 bool allow_function_literals_;
780 784
781 // The function currently being compiled. 785 // The function currently being compiled.
782 ParsedFunction* parsed_function_; 786 ParsedFunction* parsed_function_;
(...skipping 25 matching lines...) Expand all
808 int16_t last_used_try_index_; 812 int16_t last_used_try_index_;
809 813
810 bool unregister_pending_function_; 814 bool unregister_pending_function_;
811 815
812 DISALLOW_COPY_AND_ASSIGN(Parser); 816 DISALLOW_COPY_AND_ASSIGN(Parser);
813 }; 817 };
814 818
815 } // namespace dart 819 } // namespace dart
816 820
817 #endif // VM_PARSER_H_ 821 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698