mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix(luacats): allow all types inside tuples
This commit is contained in:
parent
f2083bd55c
commit
9eb0426002
@ -180,7 +180,7 @@ local grammar = P {
|
||||
fun_param = lname * opt(colon * v.ltype),
|
||||
ty_fun = Pf('fun') * paren(comma(lname * opt(colon * v.ltype))) * opt(colon * comma1(v.ltype)),
|
||||
ty_generic = P('`') * letter * P('`'),
|
||||
ty_tuple = Pf('[') * comma(v.ty_opt) * fill * P(']'),
|
||||
ty_tuple = Pf('[') * comma(v.ltype) * fill * P(']'),
|
||||
}
|
||||
|
||||
return grammar --[[@as nvim.luacats.grammar]]
|
||||
|
@ -160,10 +160,10 @@ describe('luacats grammar', function()
|
||||
type = '`T`',
|
||||
})
|
||||
|
||||
test('@param type [number,string] this is a tuple type', {
|
||||
test('@param type [number,string,"good"|"bad"] this is a tuple type', {
|
||||
desc = 'this is a tuple type',
|
||||
kind = 'param',
|
||||
name = 'type',
|
||||
type = '[number,string]',
|
||||
type = '[number,string,"good"|"bad"]',
|
||||
})
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user