From c05582295d16a9077c70f2f62c6948f6a58c89e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 22 Feb 2022 17:13:58 +0800 Subject: increase limit --- script/parser/guide.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'script/parser') diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 6f09d119..eda85c97 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -261,7 +261,7 @@ end ---@param obj parser.guide.object ---@return parser.guide.object function m.getParentFunction(obj) - for _ = 1, 1000 do + for _ = 1, 10000 do obj = obj.parent if not obj then break @@ -278,7 +278,7 @@ end ---@param obj parser.guide.object ---@return parser.guide.object function m.getBlock(obj) - for _ = 1, 1000 do + for _ = 1, 10000 do if not obj then return nil end @@ -307,7 +307,7 @@ end ---@param obj parser.guide.object ---@return parser.guide.object function m.getParentBlock(obj) - for _ = 1, 1000 do + for _ = 1, 10000 do obj = obj.parent if not obj then return nil @@ -324,7 +324,7 @@ end ---@param obj parser.guide.object ---@return parser.guide.object function m.getBreakBlock(obj) - for _ = 1, 1000 do + for _ = 1, 10000 do obj = obj.parent if not obj then return nil @@ -344,7 +344,7 @@ end ---@param obj parser.guide.object ---@return parser.guide.object function m.getDocState(obj) - for _ = 1, 1000 do + for _ = 1, 10000 do local parent = obj.parent if not parent then return obj @@ -361,7 +361,7 @@ end ---@param obj parser.guide.object ---@return parser.guide.object function m.getParentType(obj, want) - for _ = 1, 1000 do + for _ = 1, 10000 do obj = obj.parent if not obj then return nil @@ -381,7 +381,7 @@ function m.getRoot(obj) if source._root then return source._root end - for _ = 1, 1000 do + for _ = 1, 10000 do if obj.type == 'main' then source._root = obj return obj @@ -450,7 +450,7 @@ end ---@param pos integer {comment = '可见位置'} function m.getLocal(block, name, pos) block = m.getBlock(block) - for _ = 1, 1000 do + for _ = 1, 10000 do if not block then return nil end @@ -502,7 +502,7 @@ end ---@param name string {comment = '标签名'} function m.getLabel(block, name) block = m.getBlock(block) - for _ = 1, 1000 do + for _ = 1, 10000 do if not block then return nil end -- cgit v1.2.3