Ejemplo n.º 1
0
 public static Shelisp.Object Fprog1(L l, Shelisp.Object form1, params Shelisp.Object[] forms)
 {
     Shelisp.Object rv = form1.Eval(l);
     for (int i = 0; i < forms.Length; i ++)
         forms[i].Eval(l);
     return rv;
 }
Ejemplo n.º 2
0
 public static Shelisp.Object Fif(L l, Shelisp.Object condition, Shelisp.Object then_form, params Shelisp.Object[] else_forms)
 {
     if (!L.NILP(condition.Eval(l))) {
         return then_form.Eval(l);
     }
     else {
         Shelisp.Object rv = L.Qnil;
         for (int i = 0; i < else_forms.Length; i ++)
             rv = else_forms[i].Eval(l);
         return rv;
     }
 }
Ejemplo n.º 3
0
 public static AssertResult That(Shelisp.Object o, Signals signals, string lisp_error, string description = null)
 {
     try {
         o.Eval (TestRunner.L);
         return FailExpectedLispError (lisp_error, description);
     }
     catch (LispException le) {
         if (le.Symbol == L.intern (lisp_error))
             return Succeed (description);
         else
             return FailExpectedLispError (lisp_error, le, description);
     }
     catch (Exception e) {
         return FailException (e, description);
     }
 }
Ejemplo n.º 4
0
        public static Shelisp.Object Fwhile(L l, Shelisp.Object condition, params Shelisp.Object[] forms)
        {
            while (!L.NILP (condition.Eval (l))) {
                for (int i = 0; i < forms.Length; i ++)
                    forms[i].Eval(l);
            }

            return L.Qnil;
        }