diff options
Diffstat (limited to 'script/parser/compile.lua')
-rw-r--r-- | script/parser/compile.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/script/parser/compile.lua b/script/parser/compile.lua index 8b8a7770..b8040382 100644 --- a/script/parser/compile.lua +++ b/script/parser/compile.lua @@ -2289,16 +2289,15 @@ local function parseFunction(isLocal, isAction) end end if hasLeftParen then + params = params or {} local parenLeft = getPosition(Tokens[Index], 'left') Index = Index + 2 params = parseParams(params) - if params then - params.type = 'funcargs' - params.start = parenLeft - params.finish = lastRightPosition() - params.parent = func - func.args = params - end + params.type = 'funcargs' + params.start = parenLeft + params.finish = lastRightPosition() + params.parent = func + func.args = params skipSpace(true) if Tokens[Index + 1] == ')' then local parenRight = getPosition(Tokens[Index], 'right') |