CanadaPubSecALZ icon indicating copy to clipboard operation
CanadaPubSecALZ copied to clipboard

feat(docs): interactive parser playground (#2)

Open sambacha opened this issue 3 years ago • 5 comments

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.

https://sambacha.github.io/tree-sitter-solidity/

Cheers

sambacha avatar Apr 15 '21 03:04 sambacha

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:

  1. create a branch on this repo interactive_playground with the code for building the website
  2. create a github action that triggers on pushes to master which a. clones the interactive_playground b. clones master 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.

JoranHonig avatar Apr 16 '21 13:04 JoranHonig

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

sambacha avatar Apr 16 '21 21:04 sambacha

revisiting this actually

sambacha avatar Aug 17 '21 18:08 sambacha

Do you have any preference for Editor Styling? Here is an updated look https://sambacha.github.io/solidity-parser-explorer

sambacha avatar Oct 01 '21 23:10 sambacha

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!

JoranHonig avatar Oct 12 '21 09:10 JoranHonig