FuelLabs / sway

🌴 Empowering everyone to build reliable and efficient smart contracts.
https://docs.fuel.network/docs/sway/
Apache License 2.0
62.71k stars 5.36k forks source link

Add Sway support to AST Explorer #566

Open AlicanC opened 2 years ago

AlicanC commented 2 years ago

AST Explorer is "a web tool to explore the ASTs generated by various parsers". (https://github.com/fkling/astexplorer) It's like godbolt but shows AST.

ASTE can also parse Rust with this JS+WASM wrapper for syn: https://github.com/RReverser/astexplorer-syn

We should create a similar wrapper for Sway and then send a PR to ASTE that integrates it.

AlicanC commented 2 years ago

One note: I assume doing this for Compiler Explorer (godbolt) should be similar and I think CE support should be prioritized over ASTE.