You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _ast module (which seems to be a C module) contains all nodes classes that you can instantiate at will and set attributes on them like you want as you can see:
So you probably just need to write a small recursive function that takes ast2json json export and recreate the objects who's classes are stored in "_type" and set the corresponding attributes.
Hi @Psycojoker ,
Im looking for a solution if we could convert the stored ast (in json) back to the same ast format/instance and unparse it.
Right now I can only unparse the ast (using astunparse) with the parsed ast instance.
Could somebody please suggest a solution for this?
The text was updated successfully, but these errors were encountered: