scilla
scilla copied to clipboard
Code formatting tool
I have attempted to impliment a rudimentary code formatting tool for Scilla. However, due to the changing Scilla syntax & my limited knowledge on compiler design, It doesnt work as well.
It would be nice if code formatting could be done with "out of the box" tooling simmilar to how Golang & Rust do it. It would simply consume the unformatted Scilla string & output formatted Scilla code. This would make it easier to integrate in code editors.
This feature requires an AST to be implimented. However, it would also be great for someone to be able to view a raw (json based) AST as it can have several usecases.
Looks like at least part of this issue is being handled by PR https://github.com/Zilliqa/scilla/pull/696
Interesting @anton-trunov, thanks for letting me know.
A note for the future code formatter implementation: there should be an option to strip comments and whitespace (see #485).