obiwan87 / odin-intellij

Odin Support plugin for JetBrains IDEs
https://plugins.jetbrains.com/plugin/22933-odin-support
MIT License
37 stars 3 forks source link

Missing new line at the end of parameter causes error. #34

Closed MineBill closed 5 months ago

MineBill commented 5 months ago

Title is probably bad but i couldn't find another way to describe it.

Consider this:

package ifelse

main :: proc() {
    func2(
        2 // <--- HERE
    )
}

func2 :: proc(n: int) {}

It's valid Odin code to not include a , after the 2, when the closing parenthesis ) is on another line but this plugin produces the following error:

OdinTokenType.ARROW, OdinTokenType.COMMA, OdinTokenType.DOT, OdinTokenType.IF_TOKEN, OdinTokenType.LBRACKET, OdinTokenType.LPAREN or OdinTokenType.RPAREN expected