Open partylikeits1983 opened 3 months 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.
@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
@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
There is a rustfmt
like API available in the miden-formatting
crate (and re-exported via miden-core::prettier
), via the PrettyPrint
trait. This is implemented for both MASM and MAST textual formats. A formatter tool simply needs to parse a module, then write it back to disk like write!(&mut file, "{module}")?;
We don't have a linter though, that would be nice!
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.