예제 #1
0
        internal LispObject clojEval(LateSymbolPrimitive lsp, Symbol previous, LispObject[] args)
        {
            LispObject pv = previous.getSymbolValue();
            LispObject pf = previous.getSymbolFunction();

            if (lsp == pf)
            {
            }
            String s = ((Symbol)previous).getName();

            return(clojEval(lsp, s, args));
        }
예제 #2
0
        internal LispObject clojEval(LateSymbolPrimitive lsp, String s, LispObject[] args)
        {
            Object target  = null;
            int    indexOf = s.IndexOf(".");

            if (indexOf > 0)
            {
                String s1 = s.Substring(0, indexOf);
                target = findSymbol(target, s1);
                if (target != null)
                {
                    ((ScriptInterpreter)this).Intern(s1, target);
                }
                Package    pkg = CurrentPackage();
                Symbol     sym = pkg.findAccessibleSymbol(s);
                LispObject sf  = sym.getSymbolFunction();
                if (sf != null)
                {
                    if (sf != lsp)
                    {
                        return(sf.execute(args));
                    }
                }

                s = s.Substring(indexOf + 1);
                Object o = clojExecute(target, s, args);
                return(JavaObject.getInstance(o));
            }
            else
            {
                String s1 = s;
                target = findSymbol(target, s1);
                Object o = clojExecute(target, "", args);
                return(JavaObject.getInstance(o));
            }
        }
예제 #3
0
        internal LispObject clojEval(LateSymbolPrimitive lsp, String s, LispObject[] args)
        {
            Object target = null;
            int indexOf = s.IndexOf(".");
            if (indexOf > 0)
            {
                String s1 = s.Substring(0, indexOf );
                target = findSymbol(target, s1);
                if (target != null)
                {
                   ((ScriptInterpreter)this).Intern(s1, target);
                   
                }
                Package pkg = CurrentPackage();
                Symbol sym = pkg.findAccessibleSymbol(s);
                LispObject sf = sym.getSymbolFunction();
                if (sf!=null)
                {
                    if (sf!=lsp)
                    {
                        return sf.execute(args);
                    }

                }

                s = s.Substring(indexOf + 1);
                Object o = clojExecute(target, s, args);
                return JavaObject.getInstance(o);
            } else {
            String s1 = s;
            target = findSymbol(target, s1);
            Object o = clojExecute(target, "", args);
            return JavaObject.getInstance(o);
            }
        }
예제 #4
0
        internal LispObject clojEval(LateSymbolPrimitive lsp, Symbol previous, LispObject[] args)
        {
            LispObject pv = previous.getSymbolValue();
            LispObject pf = previous.getSymbolFunction();
            if (lsp == pf)
            {

            }
            String s = ((Symbol)previous).getName();
            return clojEval(lsp, s, args);
        }