Draco-lang / Compiler

The compiler repository for the Draco programming language.
Apache License 2.0
86 stars 8 forks source link

Formatter should fold long expression chain. #375

Open Kuinox opened 8 months ago

Kuinox commented 8 months ago

Long expression chain like this:

import System.Console;

func max(a:int32, b:int32): int32 = if (a > b) a else if (a > b) a else if (a > b) a else if (a > b) a else if (a > b) a else if (a > b) a else if (a > b) a else if (a > b) a else if (a > b) a else b;

func main() {
    WriteLine(max(12, 34));
}

Should be wrapped by the formatter.