BitOrchestra.Parser._OpTree.Combine C# (CSharp) Method

Combine() public static method

Combines an optree with a term using the given operator.
public static Combine ( _OpTree Left, Operator Operator, Expression Right ) : _OpTree
Left _OpTree
Operator Operator
Right Expression
return _OpTree
            public static _OpTree Combine(_OpTree Left, Operator Operator, Expression Right)
            {
                if (Left.Operator == null || Left.Operator.Precedence >= Operator.Precedence)
                    return new _OpTree(Operator, Left, new _OpTree(Right));
                else
                    return new _OpTree(Left.Operator, Left.Left, Combine(Left.Right, Operator, Right));
            }
Parser._OpTree