Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AST to JSON serialization support #246

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

Arvolear
Copy link
Contributor

Implemented AST to JSON serialization to allow third-party language analysis tools to be built. This will allow binding generators, static analyzers, and probably even linters to enter the ZK game.

We have added several cli arguments:

  • --save_ast <ast_path> to save the serialized AST to <ast_path>_ast.json file.
  • --dry_run to quit the compilation process right after parsing the circom file.

Running these two commands together will save time producing the JSONs on larger projects.

Would appreciate the feedback!

YaCodesDevelopment and others added 9 commits March 7, 2024 16:15
Now it's possible to specify default file path/name for the serialized AST file output
When --dry-run is specified, it will only run check and output serialized AST, but not compile
Removed default value.
Hint improved.
Co-authored-by: Artem Chystiakov <[email protected]>
Fix save_ast required a value, despite being optional.
Change path handling logic in save_ast to output into the given output path
feat: Add AST serialization and exporting support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants