LibJS/Bytecode: Add function to determine if we're in an async generator

This commit is contained in:
Luke Wilde 2023-07-14 21:45:41 +01:00 committed by Linus Groh
parent c37ef5694b
commit 265a9b5ffc
Notes: sideshowbarker 2024-07-16 22:58:46 +09:00

View file

@ -145,6 +145,7 @@ public:
bool is_in_generator_or_async_function() const { return m_enclosing_function_kind == FunctionKind::Async || m_enclosing_function_kind == FunctionKind::Generator || m_enclosing_function_kind == FunctionKind::AsyncGenerator; }
bool is_in_generator_function() const { return m_enclosing_function_kind == FunctionKind::Generator || m_enclosing_function_kind == FunctionKind::AsyncGenerator; }
bool is_in_async_function() const { return m_enclosing_function_kind == FunctionKind::Async || m_enclosing_function_kind == FunctionKind::AsyncGenerator; }
bool is_in_async_generator_function() const { return m_enclosing_function_kind == FunctionKind::AsyncGenerator; }
enum class BindingMode {
Lexical,