From dbb392e3f3953c6ce821755ad14bc857840f899c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 7 Nov 2022 19:59:11 +0800 Subject: full support for interface --- script/parser/compile.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'script/parser/compile.lua') 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') -- cgit v1.2.3