public Base_Object_Value GetValue(string id) { if (memo.ContainsKey(id)) { return(memo[id]); } return(Type_OBJECT.Singleton().Instanciate()); }
public Base_Object_Value Visit(AST_StamentList node) { Base_Object_Value result = Type_OBJECT.Singleton().Instanciate(); foreach (var item in node.Children) { result = item.Visit(this); } return(result); }
public Base_Object_Value Visit(AST_While node) { Base_Object_Value t = node.Cond.Visit(this); Base_Object_Value s = Type_OBJECT.Singleton().Instanciate(); while (t.IsTrue()) { s = node.WhileCorpus.Visit(this); t = node.Cond.Visit(this); } return(s); }
public Base_Object_Value Visit(AST_If node) { Base_Object_Value t = node.Cond.Visit(this); if (t.IsTrue()) { return(node.IfCorpus.Visit(this)); } if (node.ElseCorpus != null) { return(node.ElseCorpus.Visit(this)); } return(Type_OBJECT.Singleton().Instanciate()); }