public function isTerminal()
    {
        if ($this instanceof NumberNode) {
            return true;
        }

        if ($this instanceof IntegerNode) {
            return true;
        }

        if ($this instanceof RationalNode) {
            return true;
        }

        if ($this instanceof VariableNode) {
            return true;
        }

        if ($this instanceof ConstantNode) {
            return true;
        }

        return false;
    }