Esempio n. 1
0
        public static object BindReadSuppress(bool value, Thunk thunk)
        {
            ValueCell <bool> oldReadSuppress = readSuppress;

            try {
                readSuppress = new ValueCell <bool> (value);
                return(thunk());
            }
            finally {
                readSuppress = oldReadSuppress;
            }
        }
Esempio n. 2
0
        public Delegate SymbolFunction(Symbol id)
        {
            ILocation <Delegate> binding;

            if (functions.TryGetValue(id, out binding))
            {
                return(binding.Value);
            }
            if (id.NamesDotnetMethod())
            {
                Delegate gf = (Delegate)CL.EnsureGenericFunction(id, KW.GenericFunctionClass, CLOS.DotnetGenericFunction,
                                                                 KW.Environment, this,
                                                                 KW.StudlyName, id.Name);
                binding = new ValueCell <Delegate> (gf);
                return(binding.Value);
            }
            else
            {
                throw new NotImplementedException();
            }
        }