aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-12-08 10:32:29 +0000
committerLewis Russell <me@lewisr.dev>2024-12-12 09:52:08 +0000
commit130f4344cf1a8fdafcf62b392ead863d1a1379f3 (patch)
tree10f549d771706c0ae5a74d198e441027aaefb90d /scripts
parent5eda7aafe995bfefd46fe859f32fa8581ab7f15d (diff)
downloadrneovim-130f4344cf1a8fdafcf62b392ead863d1a1379f3.tar.gz
rneovim-130f4344cf1a8fdafcf62b392ead863d1a1379f3.tar.bz2
rneovim-130f4344cf1a8fdafcf62b392ead863d1a1379f3.zip
refactor(lsp/rpc): move transport logic to separate module
Diffstat (limited to 'scripts')
-rw-r--r--scripts/luacats_grammar.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/luacats_grammar.lua b/scripts/luacats_grammar.lua
index 34c1470fea..b700bcf58f 100644
--- a/scripts/luacats_grammar.lua
+++ b/scripts/luacats_grammar.lua
@@ -160,9 +160,9 @@ local typedef = P({
return vim.trim(match):gsub('^%((.*)%)$', '%1'):gsub('%?+', '?')
end
-local opt_exact = opt(Cg(Pf('(exact)'), 'access'))
local access = P('private') + P('protected') + P('package')
local caccess = Cg(access, 'access')
+local cattr = Cg(comma(access + P('exact')), 'access')
local desc_delim = Sf '#:' + ws
local desc = Cg(rep(any), 'desc')
local opt_desc = opt(desc_delim * desc)
@@ -178,7 +178,7 @@ local grammar = P {
+ annot('type', comma1(Ct(v.ctype)) * opt_desc)
+ annot('cast', ty_name * ws * opt(Sf('+-')) * v.ctype)
+ annot('generic', ty_name * opt(colon * v.ctype))
- + annot('class', opt_exact * opt(paren(caccess)) * fill * ty_name * opt_parent)
+ + annot('class', opt(paren(cattr)) * fill * ty_name * opt_parent)
+ annot('field', opt(caccess * ws) * v.field_name * ws * v.ctype * opt_desc)
+ annot('operator', ty_name * opt(paren(Cg(v.ctype, 'argtype'))) * colon * v.ctype)
+ annot(access)