Fix parsing optional arguments

This commit is contained in:
2020-03-14 16:43:27 +01:00
parent 07fc9f3dd2
commit 5c56060e70

View File

@@ -17,7 +17,7 @@ class OptionalFunctionDefinitionArgumentParser : Parser() {
) { (_, type) -> type }) { UnionTypeNode(emptyList(), TokenPosition.NONE) },
terminal(TokenType.ASSIGN),
assert(ExpressionParser(), "expression")
) { (identifier, type, defaultValue) ->
) { (identifier, type, _, defaultValue) ->
OptionalFunctionDefinitionArgumentNode(identifier, type, defaultValue)
}.parse(input)
}