summaryrefslogtreecommitdiff
path: root/script-beta/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-11 17:12:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-11 17:12:18 +0800
commit6dcde32efe1c1380af6edd49f31e748aa2b48b90 (patch)
treed1bef13a48e13a36c409f9375acc5c9a2c9ed1d7 /script-beta/parser
parent3f2c19d1990d858989d9c908964b93f99789f0e4 (diff)
downloadlua-language-server-6dcde32efe1c1380af6edd49f31e748aa2b48b90.zip
修正2个bug
Diffstat (limited to 'script-beta/parser')
-rw-r--r--script-beta/parser/luadoc.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/script-beta/parser/luadoc.lua b/script-beta/parser/luadoc.lua
index 83ae940a..d71a7b50 100644
--- a/script-beta/parser/luadoc.lua
+++ b/script-beta/parser/luadoc.lua
@@ -146,10 +146,16 @@ local function checkToken(tp, content, offset)
end
local function getStart()
+ if Ci == 0 then
+ return Offset
+ end
return TokenStarts[Ci] + Offset
end
local function getFinish()
+ if Ci == 0 then
+ return Offset
+ end
return TokenFinishs[Ci] + Offset
end
@@ -395,6 +401,7 @@ function parseType(parent)
enums = {},
resumes = {},
}
+ result.start = getStart()
while true do
local tp, content = peekToken()
if not tp then