Ejemplo n.º 1
0
 public SRUObject Visit(SRURefExpression re)
 {
     SRUObject env = null;
     if (re.Env != null && re.Env != Library.Nil)
     {
         env = re.Env.Accept(this);
     }
     else
     {
         env = this["current_frame"];
     }
     return env[re.Name];
 }
Ejemplo n.º 2
0
 public void RefTest2()
 {
     SRUExpression exp = new SRURefExpression()
     {
         Env = new SRURefExpression()
         {
             Env = null,
             Name = "Number",
         },
         Name = "parse",
     };
     Assert.AreEqual(Library.Evaluator.Invoke("eval_expression", exp).ToString(), "{ -- Native -- }");
 }