aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/luacats_grammar.lua2
-rw-r--r--test/functional/script/luacats_grammar_spec.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/luacats_grammar.lua b/scripts/luacats_grammar.lua
index 6742eab5e9..9360eb9417 100644
--- a/scripts/luacats_grammar.lua
+++ b/scripts/luacats_grammar.lua
@@ -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]]
diff --git a/test/functional/script/luacats_grammar_spec.lua b/test/functional/script/luacats_grammar_spec.lua
index d6fff3f409..9c6417f7bf 100644
--- a/test/functional/script/luacats_grammar_spec.lua
+++ b/test/functional/script/luacats_grammar_spec.lua
@@ -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)