diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-25 01:56:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-25 01:56:00 +0800 |
commit | afc5f4e128f17b70dd6f661394da1acfd924be14 (patch) | |
tree | 2823ab03cce20bcf0ed4a9d1c1f583636cdf0313 /script/parser/luadoc.lua | |
parent | 125d943a7faec97b7169d0088a12ba6a44a14c16 (diff) | |
download | lua-language-server-afc5f4e128f17b70dd6f661394da1acfd924be14.zip |
add completion and semantic for `@cast`
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r-- | script/parser/luadoc.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index e10ef356..89a5ee9b 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -1235,7 +1235,6 @@ local docSwitch = util.switch() start = getFinish(), finish = getFinish(), } - result.casts[#result.casts+1] = block if checkToken('symbol', '+', 1) then block.mode = '+' nextToken() @@ -1261,6 +1260,10 @@ local docSwitch = util.switch() end end + if block.optional or block.extends then + result.casts[#result.casts+1] = block + end + if checkToken('symbol', ',', 1) then nextToken() else |