def t_expand_define(self, expr, cont): variable = expressions.definitionVariable(expr) value = expressions.definitionValue(expr) def c_expanded(expandedValue): return pogo.bounce( cont, expressions.makeDefinition(variable, expandedValue)) return pogo.bounce(self.t_expand, value, c_expanded)
def analyzeDefinition(exp): defName = expressions.definitionVariable(exp) analyzedDefValue = analyze(expressions.definitionValue(exp)) def analyzed(env, cont): def c(defVal): environment.defineVariable(defName, defVal, env) return pogo.bounce(cont, Symbol("ok")) return pogo.bounce(analyzedDefValue, env, c) return analyzed
def c(val): environment.defineVariable( expressions.definitionVariable(exp), val, env) return pogo.bounce(cont, Symbol("ok"))
def c(val): environment.defineVariable(expressions.definitionVariable(exp), val, env) return pogo.bounce(cont, Symbol("ok"))