diff options
-rw-r--r-- | Userland/Libraries/LibJS/AST.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/AST.h b/Userland/Libraries/LibJS/AST.h index 6420845308..15a792c9fd 100644 --- a/Userland/Libraries/LibJS/AST.h +++ b/Userland/Libraries/LibJS/AST.h @@ -76,6 +76,7 @@ public: { } Value execute(Interpreter&, GlobalObject&) const override { return {}; } + virtual Optional<Bytecode::Register> generate_bytecode(Bytecode::Generator&) const override; }; class ErrorStatement final : public Statement { diff --git a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp index 1745f75e20..5440030c6f 100644 --- a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp +++ b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp @@ -27,6 +27,11 @@ Optional<Bytecode::Register> ScopeNode::generate_bytecode(Bytecode::Generator& g return {}; } +Optional<Bytecode::Register> EmptyStatement::generate_bytecode(Bytecode::Generator&) const +{ + return {}; +} + Optional<Bytecode::Register> ExpressionStatement::generate_bytecode(Bytecode::Generator& generator) const { return m_expression->generate_bytecode(generator); |