summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-15 16:47:46 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-15 16:47:46 +0800
commit77ba895e1eb5e61acbce33e355396b947a764bca (patch)
treebf92ec8004ba75848e4ce3fb464b11a08f42a7a5
parent91af9255c1ff9ec072d4505194675386753c21db (diff)
downloadlua-language-server-77ba895e1eb5e61acbce33e355396b947a764bca.zip
add log
-rw-r--r--script/parser/guide.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 59794e5f..108bccf5 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -245,7 +245,16 @@ function m.getBlock(obj)
end
obj = obj.parent
end
- error('guide.getBlock overstack')
+ -- make stack
+ local stack = {}
+ for _ = 1, 10 do
+ stack[#stack+1] = ('%s:%s'):format(obj.type, obj.start)
+ obj = obj.parent
+ if not obj then
+ break
+ end
+ end
+ error('guide.getBlock overstack:' .. table.concat(stack, ' -> '))
end
--- 寻找所在父区块