risor-io / risor

Fast and flexible scripting for Go developers and DevOps.
https://risor.io
Apache License 2.0
610 stars 26 forks source link

Allow newlines after operators in infix expressions #218

Closed myzie closed 5 months ago

myzie commented 5 months ago

This moves closer to Go regarding parsing behavior in infix expressions.

For example, in Go this outputs 6:

func main() {
    x := 1 +
        2 +
        3
    fmt.Println(x)
}