diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-26 17:20:07 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-26 17:20:07 +0800 |
commit | 7d262e90464e3feea872393da48def8d22ec97a9 (patch) | |
tree | 155f2f16d80716ba681dccb162011e82637f0e53 /script/parser/luadoc.lua | |
parent | 0ded390ce1b477e62963e8e67488b00ba8427a35 (diff) | |
download | lua-language-server-7d262e90464e3feea872393da48def8d22ec97a9.zip |
improve ipairs
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r-- | script/parser/luadoc.lua | 5 |
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 |