masm-formatter

Crates.iomasm-formatter
lib.rsmasm-formatter
version0.1.3
sourcesrc
created_at2024-06-21 22:54:29.521267
updated_at2024-06-24 15:16:43.474935
descriptionA formatter for .masm files
homepagehttps://github.com/partylikeits1983/masm-formatter
repositoryhttps://github.com/partylikeits1983/masm-formatter
max_upload_size
id1280013
size102,775
Alexander John Lee (partylikeits1983)

documentation

README

Miden Assembly Code Formatter

Basic Miden Assembly code formatter.

The following keywords affect indentation rules in Miden Assembly: begin, proc, export, if, else, repeat, while, end.

Basic Rules this formatter follows:

  1. Adds correct indentation following the code formatting rules seen in the miden-base repository.
  2. Removes trailing spaces.
  3. Deletes lines with more than 2 empty spaces.

That's pretty much it.

Would be cool to auto format comments, and maybe some other things.

This code formatter has been tested extensively, however, there may be edge cases where it fails.

Testing

cargo install --path .
cargo masm-fmt "src/asm/example3.masm"
Commit count: 18

cargo fmt