/// <summary>Forgets previously encountered operators to save memory.</summary> public virtual void Reset() { this[OperatorShape.Suffix] = Pair.Create(PredefinedSuffixPrecedence.AsMutable(), P.Primary); this[OperatorShape.Prefix] = Pair.Create(PredefinedPrefixPrecedence.AsMutable(), P.Other); this[OperatorShape.Infix] = Pair.Create(PredefinedInfixPrecedence.AsMutable(), P.Other); _suffixOpNames = null; }
/// <summary>Forgets previously encountered operators to save memory.</summary> public void Reset() { this[OperatorShape.Suffix] = Pair.Create(PredefinedSuffixPrecedence.AsMutable(), P.Suffix2); this[OperatorShape.Prefix] = Pair.Create(PredefinedPrefixPrecedence.AsMutable(), P.Reserved); this[OperatorShape.Infix] = Pair.Create(PredefinedInfixPrecedence.AsMutable(), P.Reserved); _suffixOpNames = null; }
/// <summary>Forgets previously encountered operators to save memory.</summary> public virtual void Reset() { this[OperatorShape.Suffix] = Pair.Create(PredefinedSuffixPrecedence.AsMutable(), P.SuffixWord); this[OperatorShape.Prefix] = Pair.Create(PredefinedPrefixPrecedence.AsMutable(), P.Prefix); this[OperatorShape.Infix] = Pair.Create(PredefinedInfixPrecedence.AsMutable(), _les2mode ? P.Other : P.LowerKeyword); _suffixOpNames = null; if (!_les2mode) { var infixTable = this[OperatorShape.Infix].Item1; infixTable[S.ColonColon] = LesPrecedence.Primary; infixTable[S.AndBits] = LesPrecedence.AndBits; infixTable[S.OrBits] = LesPrecedence.OrBits; infixTable[S.XorBits] = LesPrecedence.OrBits; var prefixTable = this[OperatorShape.Prefix].Item1; prefixTable[S.Dot] = P.Illegal; prefixTable[S.LT] = P.Illegal; prefixTable[S.Assign] = P.Illegal; prefixTable[S.OrBits] = P.Illegal; prefixTable[S.QuestionMark] = P.Illegal; } }