summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/AST.cpp')
-rw-r--r--Libraries/LibJS/AST.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Libraries/LibJS/AST.cpp b/Libraries/LibJS/AST.cpp
index c57abaea10..e8880cd402 100644
--- a/Libraries/LibJS/AST.cpp
+++ b/Libraries/LibJS/AST.cpp
@@ -255,6 +255,11 @@ Value IfStatement::execute(Interpreter& interpreter, GlobalObject& global_object
return js_undefined();
}
+Value WithStatement::execute(Interpreter&, GlobalObject&) const
+{
+ ASSERT_NOT_REACHED();
+}
+
Value WhileStatement::execute(Interpreter& interpreter, GlobalObject& global_object) const
{
Value last_value = js_undefined();
@@ -1142,6 +1147,18 @@ void WhileStatement::dump(int indent) const
body().dump(indent + 1);
}
+void WithStatement::dump(int indent) const
+{
+ ASTNode::dump(indent);
+
+ print_indent(indent + 1);
+ printf("Object\n");
+ object().dump(indent + 2);
+ print_indent(indent + 1);
+ printf("Body\n");
+ body().dump(indent + 2);
+}
+
void DoWhileStatement::dump(int indent) const
{
ASTNode::dump(indent);