mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
JSSpecCompiler: Allow storing NullableTrees in nodes
And use this in ElseIfBranch node.
This commit is contained in:
committed by
Andrew Kaster
parent
4eede5282c
commit
092ed1cc8a
@@ -91,9 +91,9 @@ void IfBranch::dump_tree(StringBuilder& builder)
|
||||
|
||||
void ElseIfBranch::dump_tree(StringBuilder& builder)
|
||||
{
|
||||
dump_node(builder, "ElseIfBranch {}", m_condition.has_value() ? "ElseIf" : "Else");
|
||||
if (m_condition.has_value())
|
||||
(*m_condition)->format_tree(builder);
|
||||
dump_node(builder, "ElseIfBranch {}", m_condition ? "ElseIf" : "Else");
|
||||
if (m_condition)
|
||||
m_condition->format_tree(builder);
|
||||
m_branch->format_tree(builder);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user