mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 14:02:51 +00:00
JSSpecCompiler: Allow storing NullableTree
s in nodes
And use this in ElseIfBranch node.
This commit is contained in:
parent
4eede5282c
commit
092ed1cc8a
Notes:
sideshowbarker
2024-07-16 20:08:14 +09:00
Author: https://github.com/DanShaders
Commit: 092ed1cc8a
Pull-request: https://github.com/SerenityOS/serenity/pull/20917
7 changed files with 56 additions and 18 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue