enhancementgood first issuenew tool
Metriche repository
- Star
- (1623 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Modern programming languages tend to have auto-formatters. It would be worthwhile to have one for RGBASM as well, supporting users' various preferred styles.
Configurable options (not meant as a complete list):
- Indentation: tabs or N spaces
- Max line length: backslash line continuations could apply for long lines (0 = no limit)
- Case: lower or UPPER, separately configurable for:
- hex digits
- instructions/registers/conditions
- directives/keywords
- plus a way to special-case some (e.g. lowercase everything except
MACRO/ENDMandSECTION/ENDSECTION)
- Instructions: some instructions have alternatives
- the optional
aargument foradd,sub,cpl, etc ld [hli/hld]vsld [hl+/hl-]vsldi/ldd [hl]ldh [c]vsld [$ff00+c]nz/ncvs!z/!c
- the optional
- Blank lines: configure how many blank lines to put:
- before global labels
- before new sections
- before other directives
- Anonymous labels: put
:on its own line, or on the same line as the subsequent instruction - Macros: indent macro invocations or not (or e.g. indent all of them except
mycol1macro)