summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-03-09 16:52:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-03-09 16:52:40 +0800
commitd0474de4cbef58db3d02dc63292a5946e8a9b71d (patch)
treeff492797a727318a0107f29eb42567b387089376 /script
parent5e8f6c413addf2a8cf11fba5ffda8a9648e17421 (diff)
downloadlua-language-server-d0474de4cbef58db3d02dc63292a5946e8a9b71d.zip
fix
Diffstat (limited to 'script')
-rw-r--r--script/parser/compile.lua20
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