diff options
-rw-r--r-- | script/core/linker.lua | 12 | ||||
-rw-r--r-- | script/parser/guide.lua | 9 | ||||
-rw-r--r-- | script/parser/luadoc.lua | 3 |
3 files changed, 22 insertions, 2 deletions
diff --git a/script/core/linker.lua b/script/core/linker.lua index e1be2323..d781d77a 100644 --- a/script/core/linker.lua +++ b/script/core/linker.lua @@ -427,7 +427,7 @@ function m.compileLink(source) pushForward(getID(source.class), id) if source.extends then for _, ext in ipairs(source.extends) do - pushForward(id, getID(ext)) + pushBackward(id, getID(ext)) pushBackward(getID(ext), id) end end @@ -593,6 +593,11 @@ function m.compileLink(source) ) pushForward(nodeID, getID(source.node)) end + local keyID = ('%s%s'):format( + id, + TABLE_KEY + ) + pushForward(keyID, 'dn:integer') end -- 将函数的返回值映射到具体的返回值上 if source.type == 'function' then @@ -697,6 +702,11 @@ function m.compileLink(source) ANY_FIELD ) pushForward(nodeID, getID(source.node)) + local keyID = ('%s%s'):format( + id, + TABLE_KEY + ) + pushForward(keyID, 'dn:integer') end if proto.type == 'doc.type.table' then if source.tkey then diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 7fc5e3b8..5de14856 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -565,9 +565,16 @@ function m.eachSource(ast, callback) index = index + 1 if not mark[obj] then mark[obj] = true - callback(obj) + local res = callback(obj) + if res == true then + goto CONTINUE + end + if res == false then + return + end m.addChilds(list, obj, m.childMap) end + ::CONTINUE:: end end diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index e2630446..b1d0a364 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -1209,6 +1209,9 @@ local function bindDocs(state) or src.type == '...' then sources[#sources+1] = src end + if src.type == 'table' then + return true + end end) table.sort(sources, function (a, b) return a.start < b.start |