GetValue() public méthode

public GetValue ( ScheminAtom symbol ) : IScheminType
symbol ScheminAtom
Résultat IScheminType
Exemple #1
0
        public IScheminType EvalAtom(IScheminType ast, Environment env)
        {
            ScheminAtom temp = (ScheminAtom) ast;
            IScheminType bound = null;

            if (temp.Closed)
                bound = temp.Closure.GetValue(temp);
            else
                bound = env.GetValue(temp);

            if (bound == null)
                throw new UnboundAtomException(string.Format("Unbound atom: {0}", temp));

            return bound;
        }
Exemple #2
0
        private IScheminType EvalAtom(IScheminType ast, Environment env)
        {
            ScheminAtom temp = (ScheminAtom) ast;

            IScheminType bound = env.GetValue(temp);
            if (bound == null)
            {
                throw new UnboundAtomException(string.Format("Unbound atom: {0}", temp));
            }

            return bound;
        }