-
Hey, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @vereym! There isn't really a clean way to do it because it's mostly for debugging, but if you compile with Have fun! |
Beta Was this translation helpful? Give feedback.
Hey @vereym! There isn't really a clean way to do it because it's mostly for debugging, but if you compile with
--verbose
it'll dump all of the intermediate IRs, the first of which being the AST for the input program. It's quite a lot of output, so I'd recommend dumping it to a file. If you're willing to make some minor modifications to the compiler it's pretty easy to get it as JSON/write it to a file. I'll also mention that we have this doc (https://github.com/grain-lang/grain/blob/main/docs/contributor/compiler_walkthrough.md) which is a little outdated but explains the compilation process. There's an open PR to update it, though. #2092Have fun!