private function visitFactorialNode(FunctionNode $node)
    {
        $functionName = $node->getName();
        $op = $node->getOperand();
        $operand = $op->accept($this);

        // Add parentheses most of the time.
        if ($this->isNumeric($op)) {
            if ($op->getValue() < 0) {
                $operand = "($operand)";
            }
        } elseif ($op instanceof VariableNode || $op instanceof ConstantNode) {
            // Do nothing
        } else {
            $operand = "($operand)";
        }

        return "$operand$functionName";
    }
private function visitFactorialNode(FunctionNode $node)
    {
        $functionName = $node->getName();
        $op = $node->getOperand();
        $operand = $op->accept($this);

        // Add parentheses most of the time.
        if ($this->isNumeric($op)) {
            if ($op->getValue() < 0) {
                $operand = "($operand)";
            }
        } elseif ($op instanceof VariableNode || $op instanceof ConstantNode) {
            // Do nothing
        } else {
            $operand = "($operand)";
        }

        return "$operand$functionName";
    }
private function visitFactorialNode ( FunctionNode $ node ) { $ functionName = $ node -> getName ( ) ; $ op = $ node -> getOperand ( ) ; $ operand = $ op -> accept ( $ this ) ; // Add parentheses most of the time. if ( $ this -> isNumeric ( $ op ) ) { if ( $ op -> getValue ( ) < 0 ) { $ operand = "($operand)" ; } } elseif ( $ op instanceof VariableNode || $ op instanceof ConstantNode ) { // Do nothing } else { $ operand = "($operand)" ; } return "$operand$functionName" ; }
Generate LaTeX code for factorials

@retval string
@param FunctionNode $node AST to be typeset
Generate LaTeX code for factorials