diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-03-09 16:52:40 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-03-09 16:52:40 +0800 |
commit | d0474de4cbef58db3d02dc63292a5946e8a9b71d (patch) | |
tree | ff492797a727318a0107f29eb42567b387089376 /script | |
parent | 5e8f6c413addf2a8cf11fba5ffda8a9648e17421 (diff) | |
download | lua-language-server-d0474de4cbef58db3d02dc63292a5946e8a9b71d.zip |
fix
Diffstat (limited to 'script')
-rw-r--r-- | script/parser/compile.lua | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/script/parser/compile.lua b/script/parser/compile.lua index a33fe09b..e09c958f 100644 --- a/script/parser/compile.lua +++ b/script/parser/compile.lua @@ -2905,15 +2905,17 @@ local function compileExpAsAction(exp) end end - if exp.hasExit then - for i = #Chunk, 1, -1 do - local block = Chunk[i] - if block.type == 'ifblock' - or block.type == 'elseifblock' - or block.type == 'elseblock' - or block.type == 'function' then - block.hasExit = true - break + if exp.type == 'call' then + if exp.hasExit then + for i = #Chunk, 1, -1 do + local block = Chunk[i] + if block.type == 'ifblock' + or block.type == 'elseifblock' + or block.type == 'elseblock' + or block.type == 'function' then + block.hasExit = true + break + end end end return exp |