mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +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
@@ -17,13 +17,14 @@ class RecursiveASTVisitor {
|
||||
public:
|
||||
virtual ~RecursiveASTVisitor() = default;
|
||||
|
||||
void run_in_const_subtree(NullableTree tree);
|
||||
void run_in_subtree(Tree& tree);
|
||||
|
||||
protected:
|
||||
virtual RecursionDecision on_entry(Tree) { return RecursionDecision::Recurse; }
|
||||
virtual void on_leave(Tree) { }
|
||||
|
||||
void replace_current_node_with(Tree tree);
|
||||
void replace_current_node_with(NullableTree tree);
|
||||
|
||||
private:
|
||||
RecursionDecision recurse(Tree root, NodeSubtreePointer& pointer);
|
||||
|
||||
Reference in New Issue
Block a user