protected function runActionHandler($action, TreeNodeInterface $node)
    {
        if ($node instanceof Token) {
            try {
                return $action($node->getContent());
            } catch (AbortParsingException $e) {
                if (null === $e->getOffset()) {
                    throw new AbortParsingException($e->getMessage(), $node->getOffset(), $e);
                }
                throw $e;
            } catch (AbortNodeException $e) {
                throw new AbortParsingException($e->getMessage(), $node->getOffset(), $e);
            } catch (\Throwable $e) {
                throw new \RuntimeException("Action failure in `{$this::buildActionName($node)}`", 0, $e);
            }
        }

        $args = [];
        foreach ($node->getChildren() as $child) {
            $args[] = $child->made();
        }

        try {
             $result = $action(...$args);
        } catch (AbortNodeException $e) {
            throw new AbortParsingException(
                $e->getMessage(),
                $node->getChild($e->getNodeIndex() - 1)->getOffset(),
                $e
            );
        } catch (AbortParsingException $e) {
            if (null === $e->getOffset()) {
                throw new AbortParsingException($e->getMessage(), $node->getOffset(), $e);
            }
            throw $e;
        } catch (\Throwable $e) {
            throw new \RuntimeException("Action failure in `{$this::buildActionName($node)}`", 0, $e);
        }

        if ($this->prune) {
            $node->prune();
        }

        return $result;
    }