Ark icon indicating copy to clipboard operation
Ark copied to clipboard

Make the code formatter idempotent

Open SuperFola opened this issue 1 year ago • 0 comments

Is your feature request related to a problem?

The code formatter format code ; but when running it again on an already formatted piece of code, the code appears to change once again

Describe the solution you would like

Tests should be added to ensure that the formatter is idempotent (see https://github.com/ArkScript-lang/Ark/tree/feat/formatter for inspiration).

When it's not, they have to be fixed. It might be related to how line numbers are computed inside the parser: sometimes they are computed after the closing ), sometimes before it. It has to be uniform.

Is it a big modification to the language? Leave it if you don't know

  • [ ] Breaking change
  • [ ] Compiler/syntax modifications
  • [ ] Runtime modifications (standard library, modules, packages...)

SuperFola avatar May 16 '24 12:05 SuperFola