summaryrefslogtreecommitdiff
path: root/script/parser/luadoc.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-26 17:20:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-26 17:20:07 +0800
commit7d262e90464e3feea872393da48def8d22ec97a9 (patch)
tree155f2f16d80716ba681dccb162011e82637f0e53 /script/parser/luadoc.lua
parent0ded390ce1b477e62963e8e67488b00ba8427a35 (diff)
downloadlua-language-server-7d262e90464e3feea872393da48def8d22ec97a9.zip
improve ipairs
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r--script/parser/luadoc.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index f30d47b4..7684ac1f 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -256,7 +256,7 @@ local function nextSymbolOrError(symbol)
return false
end
-local function parseTypeUnitArray(node)
+local function parseTypeUnitArray(parent, node)
if not checkToken('symbol', '[]', 1) then
return nil
end
@@ -266,6 +266,7 @@ local function parseTypeUnitArray(node)
start = node.start,
finish = getFinish(),
node = node,
+ parent = parent,
}
node.parent = result
return result
@@ -413,7 +414,7 @@ local function parseTypeUnit(parent, content)
end
result.parent = parent
while true do
- local newResult = parseTypeUnitArray(result)
+ local newResult = parseTypeUnitArray(parent, result)
or parseTypeUnitTable(parent, result)
if not newResult then
break