Skip to content

Add --visualize command that outputs the AST of a given file as graphviz #2507

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

emmericp
Copy link
Contributor

@emmericp emmericp commented Jan 31, 2024

Quick script I wrote while writing an AST-based plugin, it turned out to be immensely helpful for me while trying to learn the AST format. I hope it is equally helpful for others.

Example graph from the test:

Edit: GitHub absolutely destroys the SVG I uploaded. Copy & paste the contents of test/cli/visualize/testdata/all-types-expected.txt here to see what this does https://dreampuf.github.io/GraphvizOnline/

@sumneko
Copy link
Collaborator

sumneko commented Feb 1, 2024

Great work, thank you!

@sumneko sumneko merged commit bb2f3fa into LuaLS:master Feb 1, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants