Esempio n. 1
0
 public string Interpret(Expr expression)
 {
     try
     {
         object value = Evaluate(expression);
         return(Stringify(value));
     }
     catch (RuntimeException e)
     {
         Feebl.RuntimeError(e);
         return(null);
     }
 }
Esempio n. 2
0
 public void Interpret(List <Stmt> statements)
 {
     try
     {
         foreach (var stmt in statements)
         {
             Execute(stmt);
         }
     }
     catch (RuntimeException e)
     {
         Feebl.RuntimeError(e);
     }
 }
Esempio n. 3
0
 private ParseException Error(Token token, string msg)
 {
     Feebl.Error(token, msg);
     return(new ParseException());
 }