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

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

Issue 538803002: Enable await in for and for-in loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 // Add specified node to try block list so that it can be patched with 593 // Add specified node to try block list so that it can be patched with
594 // inlined finally code if needed. 594 // inlined finally code if needed.
595 void AddNodeForFinallyInlining(AstNode* node); 595 void AddNodeForFinallyInlining(AstNode* node);
596 // Add the inlined finally block to the specified node. 596 // Add the inlined finally block to the specified node.
597 void AddFinallyBlockToNode(AstNode* node, InlinedFinallyNode* finally_node); 597 void AddFinallyBlockToNode(AstNode* node, InlinedFinallyNode* finally_node);
598 AstNode* ParseTryStatement(String* label_name); 598 AstNode* ParseTryStatement(String* label_name);
599 RawAbstractType* ParseConstFinalVarOrType( 599 RawAbstractType* ParseConstFinalVarOrType(
600 ClassFinalizer::FinalizationKind finalization); 600 ClassFinalizer::FinalizationKind finalization);
601 AstNode* ParseVariableDeclaration(const AbstractType& type, 601 AstNode* ParseVariableDeclaration(const AbstractType& type,
602 bool is_final, 602 bool is_final,
603 bool is_const); 603 bool is_const,
604 SequenceNode** await_preamble);
604 AstNode* ParseVariableDeclarationList(); 605 AstNode* ParseVariableDeclarationList();
605 AstNode* ParseFunctionStatement(bool is_literal); 606 AstNode* ParseFunctionStatement(bool is_literal);
606 AstNode* ParseStatement(); 607 AstNode* ParseStatement();
607 SequenceNode* ParseNestedStatement(bool parsing_loop_body, 608 SequenceNode* ParseNestedStatement(bool parsing_loop_body,
608 SourceLabel* label); 609 SourceLabel* label);
609 void ParseStatementSequence(); 610 void ParseStatementSequence();
610 bool IsIdentifier(); 611 bool IsIdentifier();
611 bool IsSimpleLiteral(const AbstractType& type, Instance* value); 612 bool IsSimpleLiteral(const AbstractType& type, Instance* value);
612 bool IsFunctionTypeAliasName(); 613 bool IsFunctionTypeAliasName();
613 bool IsMixinAppAlias(); 614 bool IsMixinAppAlias();
(...skipping 10 matching lines...) Expand all
624 AstNode* ParseBinaryExpr(int min_preced); 625 AstNode* ParseBinaryExpr(int min_preced);
625 LiteralNode* ParseConstExpr(); 626 LiteralNode* ParseConstExpr();
626 static const bool kRequireConst = true; 627 static const bool kRequireConst = true;
627 static const bool kAllowConst = false; 628 static const bool kAllowConst = false;
628 static const bool kConsumeCascades = true; 629 static const bool kConsumeCascades = true;
629 static const bool kNoCascades = false; 630 static const bool kNoCascades = false;
630 AstNode* ParseAwaitableExpr(bool require_compiletime_const, 631 AstNode* ParseAwaitableExpr(bool require_compiletime_const,
631 bool consume_cascades, 632 bool consume_cascades,
632 SequenceNode** await_preamble); 633 SequenceNode** await_preamble);
633 AstNode* ParseExpr(bool require_compiletime_const, bool consume_cascades); 634 AstNode* ParseExpr(bool require_compiletime_const, bool consume_cascades);
634 AstNode* ParseExprList(); 635 AstNode* ParseAwaitableExprList();
635 AstNode* ParseConditionalExpr(); 636 AstNode* ParseConditionalExpr();
636 AstNode* ParseUnaryExpr(); 637 AstNode* ParseUnaryExpr();
637 AstNode* ParsePostfixExpr(); 638 AstNode* ParsePostfixExpr();
638 AstNode* ParseSelectors(AstNode* primary, bool is_cascade); 639 AstNode* ParseSelectors(AstNode* primary, bool is_cascade);
639 AstNode* ParseCascades(AstNode* expr); 640 AstNode* ParseCascades(AstNode* expr);
640 AstNode* ParsePrimary(); 641 AstNode* ParsePrimary();
641 AstNode* ParseStringLiteral(bool allow_interpolation); 642 AstNode* ParseStringLiteral(bool allow_interpolation);
642 String* ParseImportStringLiteral(); 643 String* ParseImportStringLiteral();
643 AstNode* ParseCompoundLiteral(); 644 AstNode* ParseCompoundLiteral();
644 AstNode* ParseSymbolLiteral(); 645 AstNode* ParseSymbolLiteral();
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 bool unregister_pending_function_; 812 bool unregister_pending_function_;
812 813
813 LocalScope* async_temp_scope_; 814 LocalScope* async_temp_scope_;
814 815
815 DISALLOW_COPY_AND_ASSIGN(Parser); 816 DISALLOW_COPY_AND_ASSIGN(Parser);
816 }; 817 };
817 818
818 } // namespace dart 819 } // namespace dart
819 820
820 #endif // VM_PARSER_H_ 821 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698