Ejemplo n.º 1
0
 Associative GetAssociative(Token op)
 {
     if (MathOperators.operators.ContainsKey(op.Value[0]))
         return MathOperators.operators[op.Value[0]].Assoc;
     else
         throw new MissingMathOperationException("Invalid operator: " + op.Type + "/" + op.Value);
 }
Ejemplo n.º 2
0
 int GetPrecedence(Token op)
 {
     if (MathOperators.operators.ContainsKey(op.Value[0]))
         return MathOperators.operators[op.Value[0]].Precevendce;
     else
         throw new MissingMathOperationException("Invalid operator: " + op.Type + "/"+op.Value);
 }