diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-01-09 17:42:27 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-01-09 17:42:27 +0800 |
commit | 1ca3b7d67c0c30af1f67fae71b5c770b9008e4d5 (patch) | |
tree | 3fc65cdcca53aec16a1e03843a473ea5e9045cc3 /script/parser | |
parent | c796d406329170e010590d7c9584b8483021cee3 (diff) | |
download | lua-language-server-1ca3b7d67c0c30af1f67fae71b5c770b9008e4d5.zip |
improve performance
Diffstat (limited to 'script/parser')
-rw-r--r-- | script/parser/guide.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index b9bfe30b..0cf41389 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -1253,9 +1253,13 @@ function m.getTopBlock(source) if not m.isBlockType(block) then return nil end - if block.type ~= 'do' then + if block.type ~= 'do' + and block.type ~= 'in' + and block.type ~= 'loop' + and block.type ~= 'repeat' then return block end + source = block end return nil end |