summaryrefslogtreecommitdiff
path: root/script/parser/compile.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/parser/compile.lua')
-rw-r--r--script/parser/compile.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/script/parser/compile.lua b/script/parser/compile.lua
index 83153614..8c5979f7 100644
--- a/script/parser/compile.lua
+++ b/script/parser/compile.lua
@@ -2833,7 +2833,8 @@ local function compileExpAsAction(exp)
local block = Chunk[i]
if block.type == 'ifblock'
or block.type == 'elseifblock'
- or block.type == 'else' then
+ or block.type == 'elseblock'
+ or block.type == 'function' then
block.hasError = true
break
end
@@ -2986,7 +2987,8 @@ local function parseReturn()
local block = Chunk[i]
if block.type == 'ifblock'
or block.type == 'elseifblock'
- or block.type == 'else' then
+ or block.type == 'elseblock'
+ or block.type == 'function' then
block.hasReturn = true
break
end