mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
fix(types): use vararg return type annotation
build(types): allow vararg returns in function types
This commit is contained in:
committed by
Lewis Russell
parent
c06f3dbe3e
commit
e947f226be
@ -178,7 +178,8 @@ local grammar = P {
|
||||
table_elem = v.table_key * colon * v.ltype,
|
||||
ty_table = Pf('{') * comma1(v.table_elem) * fill * P('}'),
|
||||
fun_param = lname * opt(colon * v.ltype),
|
||||
ty_fun = Pf('fun') * paren(comma(lname * opt(colon * v.ltype))) * opt(colon * comma1(v.ltype)),
|
||||
fun_ret = v.ltype + (ident * colon * v.ltype) + (P('...') * opt(colon * v.ltype)),
|
||||
ty_fun = Pf('fun') * paren(comma(lname * opt(colon * v.ltype))) * opt(colon * comma1(v.fun_ret)),
|
||||
ty_generic = P('`') * letter * P('`'),
|
||||
ty_tuple = Pf('[') * comma(v.ltype) * fill * P(']'),
|
||||
}
|
||||
|
Reference in New Issue
Block a user