Index: src/ast/ast.h |
diff --git a/src/ast/ast.h b/src/ast/ast.h |
index 7188fd19fed52c19c197b201c860602263e7059d..eebd6d750268d4209ae0eec1a5ea4ff92bb52736 100644 |
--- a/src/ast/ast.h |
+++ b/src/ast/ast.h |
@@ -2541,6 +2541,10 @@ class Suspend final : public Expression { |
return suspend_id() > 0 && (flags() & SuspendFlags::kAsyncGeneratorAwait) == |
SuspendFlags::kAsyncGenerator; |
} |
+ inline bool IsNonInitialGeneratorYield() const { |
+ // Return true if is_generator() && !is_await() && yield_id() > 0 |
+ return suspend_id() > 0 && (flags() == SuspendFlags::kGeneratorYield); |
+ } |
void set_expression(Expression* e) { expression_ = e; } |
void set_suspend_id(int id) { suspend_id_ = id; } |