Beispiel #1
0
 public dynamic EvalScoped(Func<dynamic> f)
 {
     var e = env;
     var r = f();
     env = e;
     return r;
 }
 public LabelExpression CreateReturnTarget()
 {
     var target = Expression.Label(typeof(Object), ReturnTargetName);
     var label = Expression.Label(target, Expression.Constant(null));
     env = env.AddBinding(ReturnTargetName, label);
     return label;
 }
 public Expression ScopedExpr(Func<Expression> x)
 {
     VarBindings old = env;
     var result = x();
     env = old;
     return result;
 }
Beispiel #4
0
        public LabelExpression CreateReturnTarget()
        {
            var target = Expression.Label(typeof(Object), ReturnTargetName);
            var label  = Expression.Label(target, Expression.Constant(null));

            env = env.AddBinding(ReturnTargetName, label);
            return(label);
        }
Beispiel #5
0
        public Expression ScopedExpr(Func <Expression> x)
        {
            VarBindings old    = env;
            var         result = x();

            env = old;
            return(result);
        }
        public dynamic EvalScoped(Func <dynamic> f)
        {
            var e = env;
            var r = f();

            env = e;
            return(r);
        }
 public JSFunction(VarBindings c, Node n) { 
     capture = c;  
     node = n;
     if (n.Count == 3)
     {
         name = n[0].Text;
         parms = n[1];
         body = n[2];
     }
     else
     {
         parms = n[0];
         body = n[1];
     }
 }
 public JSFunction(VarBindings c, Node n)
 {
     capture = c;
     node    = n;
     if (n.Count == 3)
     {
         name  = n[0].Text;
         parms = n[1];
         body  = n[2];
     }
     else
     {
         parms = n[0];
         body  = n[1];
     }
 }
Beispiel #9
0
 public RubyFunction(VarBindings c, Node n) : base(new RubyClass("Function"))
 {
     capture = c;
     node    = n;
     if (n.Count == 3)
     {
         name  = n[0].Text;
         parms = n[1];
         body  = n[2];
     }
     else
     {
         parms = n[0];
         body  = n[1];
     }
 }
Beispiel #10
0
 public Expression AddBinding(string name, Expression exp)
 {
     env = env.AddBinding(name, exp);
     return(exp);
 }
Beispiel #11
0
 public dynamic AddBinding(string name, dynamic x)
 {
     env = env.AddBinding(name, x);
     return x;
 }
 public dynamic AddBinding(string name, dynamic x)
 {
     env = env.AddBinding(name, x);
     return(x);
 }
 public Expression AddBinding(string name, Expression exp)
 {
     env = env.AddBinding(name, exp);
     return exp;
 }