CanadaPubSecALZ
CanadaPubSecALZ copied to clipboard
feat(docs): interactive parser playground (#2)
Hello, just wanted to share this don't have to merge this PR. This adds the playground functionality you see for other languages on the tree sitter webpage for solidity. Utilizes jekyll + wasm generated parser. Only caveats are renaming the wasm file output to all lowercase and building the jekyll site on a local machine, github pages won't work.
Cheers
Wow! This is really cool!
@sambacha you've already done a lot but if you have time it'd be super helpful. I'm thinking of setting up the following:
- create a branch on this repo
interactive_playground
with the code for building the website - create a github action that triggers on pushes to master which
a. clones the
interactive_playground
b. clonesmaster
c. builds & deploys to gh pages
Once I have that I'll give you a ping to review!
In addition to that, I'll probably also want to leverage the rust code & config to deploy a tree-sitter-solidity as a package.
sounds great, additionally, if you do decide to leverage rust you should check out this: https://github.com/afnanenayet/diffsitter it will enable you to utilize tree-sitter as an AST-based diff tool so that you can get meaningful semantic diffs.
Let me know how I can help,
Cheers,
Sam
revisiting this actually
Do you have any preference for Editor Styling? Here is an updated look https://sambacha.github.io/solidity-parser-explorer
Hey Sam,
I'm really sorry for being so slow to respond. I have too many side projects 🙈
I don't have strong styling preferences. Though having the ast in a box with isolated scrolling is definitely helpful!
Also thanks for the reference to diffsitter, really cool!