summaryrefslogtreecommitdiff
path: root/script/parser/luadoc.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-21 22:19:26 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-21 22:19:26 +0800
commit7291440d890483f70ddd7ba00db483af0257b499 (patch)
tree27d2a33c88a2f7d8ef908297bc5d7e9771db68d7 /script/parser/luadoc.lua
parent8ba44c3e21ac761b88226fec0cc8a5347a4a5804 (diff)
parenta19f2ee7394c5f5a10342a37497fbd7b7587316c (diff)
downloadlua-language-server-7291440d890483f70ddd7ba00db483af0257b499.zip
Merge remote-tracking branch 'origin/type-narrow'
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r--script/parser/luadoc.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 4cb8b520..2a570454 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -709,6 +709,10 @@ function parseType(parent)
if not result.start then
result.start = getFinish()
end
+ if checkToken('symbol', '?', 1) then
+ nextToken()
+ result.optional = true
+ end
result.finish = getFinish()
result.firstFinish = result.finish