Hi lhf, a suddenly idea appears to me. As we already had some lua functions
like "loadstring" which could compile the lua codes to byte codes directly
on the fly. But why don't we also provide some c level functions further like:
load_lua_code_to_ast: return corresponding ast table (the ast described by
linked lua tables, and users could modify it as their wishes)
translate_ast_to_lua_code: translate the ast table to lua source code again
execute_ast: execute the ast directly
Of course some other library already done the equivalent job, but I think this job
should be done by lua itself as many nowadays language provide their own parser
which could parse themself to certain AST(like golang) and it would be more stable
and performant.
We could say:
Lua: The code is data, the data is code (: we could go even further than lisp :)