예제 #1
0
파일: Env.cs 프로젝트: CHNB128/GCL
 public Env find(eSymbol key)
 {
     if (data.ContainsKey(key.getName()))
     {
         return(this);
     }
     else if (outer != null)
     {
         return(outer.find(key));
     }
     else
     {
         return(null);
     }
 }
예제 #2
0
파일: Repl.cs 프로젝트: CHNB128/GCL
 public static bool is_macro_call(eValue ast, Env env)
 {
     if (ast is eList)
     {
         eValue a0 = ((eList)ast) [0];
         if (a0 is eSymbol &&
             env.find((eSymbol)a0) != null)
         {
             eValue mac = env.get((eSymbol)a0);
             if (mac is eFunction &&
                 ((eFunction)mac).isMacro())
             {
                 return(true);
             }
         }
     }
     return(false);
 }