diff options
-rw-r--r-- | script/parser/guide.lua | 11 |
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 --- 寻找所在父区块 |