예제 #1
0
 def visit_define_values(self, ast, vars, env_structure):
     assert isinstance(ast, DefineValues)
     need_cell_flags = [ModuleVar(i, None, i) in vars for i in ast.names]
     rhs = ast.rhs.visit(self, vars, env_structure)
     if True in need_cell_flags:
         rhs = Cell(rhs, need_cell_flags)
     return DefineValues(ast.names, rhs, ast.display_names)
예제 #2
0
파일: test_ast.py 프로젝트: 8l/pycket
def make_symbols(d):
    v = variable_set()
    for i, j in d.iteritems():
        v[ModuleVar(W_Symbol.make(i), None, W_Symbol.make(i))] = j
    return v
예제 #3
0
 def visit_module_var(self, ast):
     assert isinstance(ast, ModuleVar)
     var = ModuleVar(ast.sym, ast.srcmod, ast.srcsym, ast.path)
     var.modenv = ast.modenv
     var.w_value = ast.w_value
     return var
예제 #4
0
 def visit_module_var(self, ast):
     assert isinstance(ast, ModuleVar)
     var = ModuleVar(ast.sym, ast.srcmod, ast.srcsym, ast.path)
     var.modenv = ast.modenv
     var.w_value = ast.w_value
     return var