callback = $callback; } } public function build(Shell $shell, RootNodeBuilder $rootBuilder): Node { if (isset($this->callback)) { return ($this->callback)($shell); } return Node::leaf($shell, $shell->value()); } }