public int Eval(MyIDictionary <string, int> tbl)
 {
     if (!tbl.isDefined(id))
     {
         MyException ex = new MyException("Variable does not exist!");
         throw ex;
     }
     return(tbl.lookup(id));
 }
Exemple #2
0
 public override int eval(MyIDictionary <string, int> tbl)
 {
     try
     {
         return(tbl.lookup(id));
     }
     catch (MyException ex)
     {
         throw new MyException("" + ex);
     }
 }
 public override int eval(MyIDictionary <string, int> dict)
 {
     try { return(dict.lookup(val)); }
     catch (DictExceptions e) { throw new StmtExceptions(e); }
 }