0xPolygonMiden / miden-base

Core components of the Polygon Miden rollup
MIT License
61 stars 32 forks source link

Miden Assembly Linter? #729

Open partylikeits1983 opened 3 weeks ago

partylikeits1983 commented 3 weeks ago

Feature description

I was wondering if there is a linter/code formatter for miden assembly files. There is probably some standard code formatter for assembly that could be adapted to miden assembly.

Why is this feature needed?

Improves readability and standardization of Miden Assembly files.

bobbinth commented 3 weeks ago

This would be super cool - but we don't have it yet. I think @polydez has created a simple syntax highlighter for Miden assembler - but I don't know if it does any formatting.

polydez commented 3 weeks ago

@bobbinth, no, it does just simple syntax highlighting for reserved words. It also has several code snippets, like begin ... end: https://github.com/polydez/masm-syntax-hl

partylikeits1983 commented 6 days ago

@bobbinth @polydez I built a basic MASM formatter, it is pretty basic, and probably still has issues that need to be ironed out. Here it is: https://github.com/partylikeits1983/masm-formatter

https://crates.io/crates/masm-formatter