summaryrefslogtreecommitdiff
path: root/script/parser/luadoc.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-14 18:00:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-14 18:00:40 +0800
commit6c750bc0fcd0c76282ab61367d661c5e49844253 (patch)
tree281d3511cdba3533657adf95bff3eb5dfcb38619 /script/parser/luadoc.lua
parent9ad3fdce5bd6c889f5734eddd04708595e1fa621 (diff)
downloadlua-language-server-6c750bc0fcd0c76282ab61367d661c5e49844253.zip
support char
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r--script/parser/luadoc.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 91ed44c0..9ea99f39 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -1415,9 +1415,10 @@ local docSwitch = util.switch()
if fullSource == '' then
return
end
- local source, line = fullSource:match('^(.-):(%d+)$')
+ local source, line, char = fullSource:match('^(.-):?(%d*):?(%d*)$')
source = source or fullSource
line = tonumber(line) or 1
+ char = tonumber(char) or 0
local uri
if furi.split(source) then
uri = source
@@ -1430,6 +1431,7 @@ local docSwitch = util.switch()
finish = getFinish(),
source = uri,
line = line,
+ char = char,
}
return result
end)