aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/luacats_grammar.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/luacats_grammar.lua b/scripts/luacats_grammar.lua
index 9360eb9417..ebb0183fd9 100644
--- a/scripts/luacats_grammar.lua
+++ b/scripts/luacats_grammar.lua
@@ -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(']'),
}