mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
JSSpecCompiler: Introduce ControlFlowOperator nodes
This commit is contained in:
parent
81519975c5
commit
67e07fa4e2
Notes:
sideshowbarker
2024-07-17 08:45:34 +09:00
Author: https://github.com/DanShaders
Commit: 67e07fa4e2
Pull-request: https://github.com/SerenityOS/serenity/pull/21005
Reviewed-by: https://github.com/ADKaster ✅
3 changed files with 75 additions and 0 deletions
|
@ -34,6 +34,23 @@ void ErrorNode::dump_tree(StringBuilder& builder)
|
|||
dump_node(builder, "Error \"{}\"", m_error);
|
||||
}
|
||||
|
||||
void ControlFlowFunctionReturn::dump_tree(StringBuilder& builder)
|
||||
{
|
||||
dump_node(builder, "ControlFlowFunctionReturn");
|
||||
m_return_value->format_tree(builder);
|
||||
}
|
||||
|
||||
void ControlFlowJump::dump_tree(StringBuilder& builder)
|
||||
{
|
||||
dump_node(builder, "ControlFlowJump jump={:p}", m_block);
|
||||
}
|
||||
|
||||
void ControlFlowBranch::dump_tree(StringBuilder& builder)
|
||||
{
|
||||
dump_node(builder, "ControlFlowBranch true={:p} false={:p}", m_then, m_else);
|
||||
m_condition->format_tree(builder);
|
||||
}
|
||||
|
||||
void MathematicalConstant::dump_tree(StringBuilder& builder)
|
||||
{
|
||||
dump_node(builder, "MathematicalConstant {}", m_number);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue