예제 #1
0
 public MyError Set(string key, PyObj value)
 {
     if (SymbolTable.Set(key, value))
     {
         return(null);
     }
     if (!IsBottom())
     {
         return(OuterScope.Set(key, value));
     }
     return(ScopeErrorFactory.NotFound(key));
 }
예제 #2
0
        public Word Get(string key)
        {
            MemoryBlock memoryBlock = SymbolTable.Get(key);

            if (memoryBlock != null)
            {
                return(memoryBlock);
            }
            if (!IsBottom())
            {
                return(OuterScope.Get(key));
            }
            return(ScopeErrorFactory.NotFound(key));
        }