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

Unified Diff: runtime/vm/ast.h

Issue 447003003: Introduce await (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase + bring up to date Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/ast_printer.cc » ('j') | runtime/vm/ast_transformer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
diff --git a/runtime/vm/ast.h b/runtime/vm/ast.h
index 26a6be23579056b760acada4ecfb14a297d92338..b64b8dbff87e5e75c64e24bd5a102947b71de38b 100644
--- a/runtime/vm/ast.h
+++ b/runtime/vm/ast.h
@@ -16,6 +16,7 @@
namespace dart {
#define FOR_EACH_NODE(V) \
+ V(Await) \
V(Return) \
V(Literal) \
V(Type) \
@@ -146,6 +147,28 @@ class AstNode : public ZoneAllocated {
};
+class AwaitNode : public AstNode {
+ public:
+ AwaitNode(intptr_t token_pos, AstNode* expr)
+ : AstNode(token_pos),
+ expr_(expr) {
srdjan 2014/08/13 18:41:05 all in one line ?
Michael Lippautz (Google) 2014/08/13 20:32:23 Done.
+ }
+
+ void VisitChildren(AstNodeVisitor* visitor) const {
+ expr_->Visit(visitor);
+ }
+
+ AstNode* expr() const { return expr_; }
+
+ DECLARE_COMMON_NODE_FUNCTIONS(AwaitNode);
+
+ private:
+ AstNode* expr_;
+
+ DISALLOW_COPY_AND_ASSIGN(AwaitNode);
+};
+
+
class SequenceNode : public AstNode {
public:
SequenceNode(intptr_t token_pos, LocalScope* scope)
« no previous file with comments | « no previous file | runtime/vm/ast_printer.cc » ('j') | runtime/vm/ast_transformer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698