ASTs parsed from source contains lot of stuff it is inconvenient to set when generating AST. Such as lone numbers and ctxes. Without them the code won't compile and run. An obvious way to recreate them is to serialize the AST into source and then parse it. But it seems inefficient. Since the stuff is redundant and can be restored from the AST itself, it's nice to have a function doing that.
ASTs parsed from source contains lot of stuff it is inconvenient to set when generating AST. Such as lone numbers and
ctx
es. Without them the code won't compile and run. An obvious way to recreate them is to serialize the AST into source and then parse it. But it seems inefficient. Since the stuff is redundant and can be restored from the AST itself, it's nice to have a function doing that.