AddTo() public static method

public static AddTo ( LexicalEnvironment env ) : LexicalEnvironment
env LispEngine.Evaluation.LexicalEnvironment
return LispEngine.Evaluation.LexicalEnvironment
        /**
         * Create a "sandbox" environment: the symbols defined in the
         * environment don't provide any way for lisp programs to execute
         * arbitrary code.
         */
        public static LexicalEnvironment CreateSandbox()
        {
            var env = LexicalEnvironment.Create();

            env = CoreForms.AddTo(env);
            env = Builtins.AddTo(env);
            return(env);
        }
Exemplo n.º 2
0
        /**
         * Create a "sandbox" environment: the symbols defined in the
         * environment don't provide any way for lisp programs to execute
         * arbitrary code.
         */
        public static Environment CreateSandbox()
        {
            var env = new Environment(EmptyEnvironment.Instance);

            env = CoreForms.AddTo(env);
            env = Builtins.AddTo(env);
            return(env);
        }