Esempio n. 1
0
 public override void CreateVariables(Executive engine, object form, ILGen il, LocalAccess locals, object[] args)
 {
     if (args.Length == 0)
         throw new ArgumentException("Unproperly formated expression");
     locals.DeclareScope(form);
     locals.EnterScope(form, _activeScope);
     foreach (object arg in Lisp.getIterator(args[0]))
     {
         object[] pair = Lisp.ToArray(arg);
         if (pair.Length != 2 || !Lisp.IsAtom(pair[0]))
             throw new ArgumentException("Unproperly formated expression");
         locals.DeclareLocal(pair[0]);
         engine.CreateVariables(il, locals, pair[1]);
     }
     if (!_activeScope)
         locals.ActivateScope();
     for (int k = 1; k < args.Length; k++)
         engine.CreateVariables(il, locals, args[k]);
     locals.LeaveScope();
 }
Esempio n. 2
0
 public virtual void CreateVariables(Executive engine, object form, ILGen il, LocalAccess locals, object[] args)
 {
     foreach (object arg in args)
         engine.CreateVariables(il, locals, arg);
 }