diff options
Diffstat (limited to 'script-beta/parser/luadoc.lua')
-rw-r--r-- | script-beta/parser/luadoc.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/script-beta/parser/luadoc.lua b/script-beta/parser/luadoc.lua index 121b25eb..e2aa950d 100644 --- a/script-beta/parser/luadoc.lua +++ b/script-beta/parser/luadoc.lua @@ -705,7 +705,10 @@ local function bindDoc(state, lns, binded) or src.type == 'tablefield' or src.type == 'tableindex' or src.type == 'function' then - src.docs = binded + src.bindDocs = binded + for _, doc in ipairs(binded) do + doc.bind = src + end end end) end @@ -715,7 +718,7 @@ local function bindDocs(state) local binded for _, doc in ipairs(state.ast.docs) do if not isNextLine(lns, binded, doc) then - bindDoc(state, binded) + bindDoc(state, lns, binded) binded = {} end binded[#binded+1] = doc @@ -750,5 +753,9 @@ return function (_, state) end end + if #ast.docs == 0 then + return + end + bindDocs(state) end |