mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibJS: Rename WhileStatement::predicate() => body()
This name matches other parsers.
This commit is contained in:
parent
644ff1bbfd
commit
da0715aba9
2 changed files with 6 additions and 6 deletions
|
@ -166,7 +166,7 @@ Value IfStatement::execute(Interpreter& interpreter) const
|
|||
Value WhileStatement::execute(Interpreter& interpreter) const
|
||||
{
|
||||
Value last_value = js_undefined();
|
||||
while (m_predicate->execute(interpreter).to_boolean()) {
|
||||
while (m_test->execute(interpreter).to_boolean()) {
|
||||
if (interpreter.exception())
|
||||
return {};
|
||||
last_value = interpreter.run(*m_body);
|
||||
|
@ -564,7 +564,7 @@ void WhileStatement::dump(int indent) const
|
|||
|
||||
print_indent(indent);
|
||||
printf("While\n");
|
||||
predicate().dump(indent + 1);
|
||||
test().dump(indent + 1);
|
||||
body().dump(indent + 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue