summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/parser/guide.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index eed2674f..3e2fb69b 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -2141,6 +2141,9 @@ function m.checkReturnMark(status, a, mark)
end
function m.searchSameFieldsInValue(status, ref, start, pushQueue, mode)
+ if status.share.inBeSetValue and status.share.inBeSetValue > 0 then
+ return
+ end
local value = m.getObjectValue(ref)
if not value then
return
@@ -2241,11 +2244,13 @@ function m.checkSameSimpleAsSetValue(status, ref, start, pushQueue)
if not obj then
return
end
+ status.share.inBeSetValue = (status.share.inBeSetValue or 0) + 1
local newStatus = m.status(status)
m.searchRefs(newStatus, obj, 'ref')
for _, res in ipairs(newStatus.results) do
pushQueue(res, start, true)
end
+ status.share.inBeSetValue = (status.share.inBeSetValue or 0) - 1
end
local function getTableAndIndexIfIsForPairsKeyOrValue(ref)
@@ -2333,6 +2338,9 @@ function m.checkSameSimpleInString(status, ref, start, pushQueue, mode)
and not hasTypeName(ref, 'string') then
return
end
+ if status.depth > 5 then
+ return
+ end
if not status.interface.docType then
return
end
@@ -2904,7 +2912,7 @@ function m.searchRefs(status, obj, mode)
tracy.ZoneEnd()
-- 检查simple
tracy.ZoneBeginN('searchRefs searchSameFields')
- if status.depth <= 10 then
+ if status.depth <= 20 then
local simple = m.getSimple(obj)
if simple then
m.searchSameFields(status, simple, mode)
@@ -4379,4 +4387,8 @@ function m.requestInfer(obj, interface, deep)
return status.results, status.share.count
end
+function m.debugView(obj)
+ return require 'files'.position(m.getUri(obj), obj.start)
+end
+
return m