Replies: 1 comment 3 replies
-
Not that I know of. Outputting the AST as an S-expression then using a scheme-like language such as Racket to transform it could be an idea, but might not work well given the JavaScript constraint. Are you talking about using the AST to rewrite the actual TLA+ code, or just rewriting the AST itself? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Do you know if there is there any mechanism for describing transformations on the parsed tree-sitter AST in some standardized way? I've been sort of doing an ad hoc version of this in the JS TLA+ interpreter by replacing AST nodes in their corresponding locations in the source text and then re-parsing. Just curious if there were any existing facilities for this built into the tree-sitter API.
Beta Was this translation helpful? Give feedback.
All reactions