Diff
Not logged in

Differences From Artifact [cd634c9bb4b6ba14]:

To Artifact [56ac5c69da3fe94e]:


173 else 173 else 174 t.set(e.tupleof[i].stringof[2..$], ValueLayer, a 174 t.set(e.tupleof[i].stringof[2..$], ValueLayer, a 175 return t; 175 return t; 176 } 176 } 177 else 177 else 178 static assert(false, "unknown type <"~T.stringof~"> during AST e 178 static assert(false, "unknown type <"~T.stringof~"> during AST e 179 } 179 } > 180 > 181 /// No hook version > 182 Value ast2table(T)(T e) > 183 { > 184 //[TODO] I really need to automate this!!!!!!!!!!!!1 > 185 Value rec(AST _) { > 186 if(auto e = cast(Str)_) return ast2table(e, &rec); > 187 if(auto e = cast(Int)_) return ast2table(e, &rec); > 188 if(auto e = cast(Var)_) return ast2table(e, &rec); > 189 if(auto e = cast(Die)_) return ast2table(e, &rec); > 190 if(auto e = cast(Let)_) return ast2table(e, &rec); > 191 if(auto e = cast(Lay)_) return ast2table(e, &rec); > 192 if(auto e = cast(App)_) return ast2table(e, &rec); > 193 if(auto e = cast(Fun)_) return ast2table(e, &rec); > 194 assert(false); > 195 } > 196 return rec(e); > 197 }