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
(Yes, sorry, I misunderstood your question at first)
There is no direct way to do that. You'll have to write a transformer that generates a cairo file from an AST.
You can use the line/column information to restore the same whitespace, and it's also possible to collect the ignore tokens into an array, using lexer_callbacks.
thank you.
I am a bit new to this, it's called a generator or serializer ?
I think https://babeljs.io/docs/en/babel-generator is turning js ast to js code, do you have maybe other example of such tool ?
Hi,
Let's say I use https://github.com/crytic/amarna/blob/main/amarna/grammars/cairo.lark and https://github.com/lark-parser/Lark.js to get the AST tree of a cairo file. What do I use after to generate a cairo file from the AST ?
Thank you
The text was updated successfully, but these errors were encountered: