diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-04 21:21:19 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-04 21:22:03 +0200 |
commit | da0715aba96b85a6df23854960ebb3382fa0cf1f (patch) | |
tree | 2e41444630b32fd212fa4abc57cc1b39f08d8f97 /Libraries/LibJS/AST.cpp | |
parent | 644ff1bbfd53943dde39fbef6cbeca0d607e4c18 (diff) | |
download | serenity-da0715aba96b85a6df23854960ebb3382fa0cf1f.zip |
LibJS: Rename WhileStatement::predicate() => body()
This name matches other parsers.
Diffstat (limited to 'Libraries/LibJS/AST.cpp')
-rw-r--r-- | Libraries/LibJS/AST.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibJS/AST.cpp b/Libraries/LibJS/AST.cpp index ce9bc94267..1b4cd0d76b 100644 --- a/Libraries/LibJS/AST.cpp +++ b/Libraries/LibJS/AST.cpp @@ -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); } |