diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
commit | d5f194ce780c95821a855aca3c19426576d28ae0 (patch) | |
tree | d45f461b19f9118ad2bb1f440a7a08973ad18832 /scripts/luacats_grammar.lua | |
parent | c5d770d311841ea5230426cc4c868e8db27300a8 (diff) | |
parent | 44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff) | |
download | rneovim-d5f194ce780c95821a855aca3c19426576d28ae0.tar.gz rneovim-d5f194ce780c95821a855aca3c19426576d28ae0.tar.bz2 rneovim-d5f194ce780c95821a855aca3c19426576d28ae0.zip |
Diffstat (limited to 'scripts/luacats_grammar.lua')
-rw-r--r-- | scripts/luacats_grammar.lua | 4 |
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) |