mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:37:36 +00:00
LibJS: Track whether a program has a top level await statement
This commit is contained in:
parent
aca427fc8c
commit
99edf5b25a
2 changed files with 21 additions and 0 deletions
|
@ -426,6 +426,9 @@ public:
|
|||
NonnullRefPtrVector<ImportStatement> const& imports() const { return m_imports; }
|
||||
NonnullRefPtrVector<ExportStatement> const& exports() const { return m_exports; }
|
||||
|
||||
bool has_top_level_await() const { return m_has_top_level_await; }
|
||||
void set_has_top_level_await() { m_has_top_level_await = true; }
|
||||
|
||||
ThrowCompletionOr<void> global_declaration_instantiation(Interpreter& interpreter, GlobalObject& global_object, GlobalEnvironment& global_environment) const;
|
||||
|
||||
private:
|
||||
|
@ -436,6 +439,7 @@ private:
|
|||
|
||||
NonnullRefPtrVector<ImportStatement> m_imports;
|
||||
NonnullRefPtrVector<ExportStatement> m_exports;
|
||||
bool m_has_top_level_await { false };
|
||||
};
|
||||
|
||||
class BlockStatement final : public ScopeNode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue