Tools.Precedence.CheckType C# (CSharp) Method

CheckType() static private method

static private CheckType ( Precedence p, PrecType t, int d ) : int
p Precedence
t PrecType
d int
return int
        static int CheckType(Precedence p,PrecType t, int d)
        {
            if (p==null)
                return 0;
            if (p.m_type==t || (p.m_type<=PrecType.nonassoc && t<=PrecType.nonassoc))
                return p.m_prec;
            return Check(p.m_next,t, d+1);
        }

Usage Example

Exemplo n.º 1
0
 public Precedence(Precedence.PrecType t, int p, Precedence next)
 {
     if (Precedence.CheckType(next, t, 0) != 0)
     {
         Console.WriteLine("redeclaration of precedence");
     }
     this.m_next = next;
     this.m_type = t;
     this.m_prec = p;
 }
All Usage Examples Of Tools.Precedence::CheckType