* merge master * fix unexpected tokenpull/2475/head
parent
eef73eea22
commit
7680d9a23c
|
@ -1051,11 +1051,8 @@ fn (p mut Parser) fn_call_args(f mut Fn) {
|
||||||
if p.tok != .comma && !is_variadic {
|
if p.tok != .comma && !is_variadic {
|
||||||
p.error('wrong number of arguments for $i,$arg.name fn `$f.name`: expected $f.args.len, but got less')
|
p.error('wrong number of arguments for $i,$arg.name fn `$f.name`: expected $f.args.len, but got less')
|
||||||
}
|
}
|
||||||
if p.tok == .comma {
|
if p.tok == .comma && (!is_variadic || (is_variadic && i < f.args.len-2 )) {
|
||||||
p.fgen(', ')
|
p.check(.comma)
|
||||||
}
|
|
||||||
if !is_variadic {
|
|
||||||
p.next()
|
|
||||||
p.gen(',')
|
p.gen(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue