diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-11-07 19:59:11 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-11-07 19:59:11 +0800 |
commit | dbb392e3f3953c6ce821755ad14bc857840f899c (patch) | |
tree | f2fc91e6497ba29ef599cced40337f5b7e9ca368 /script/parser | |
parent | 8ed72a93bc27d86b4a4b5e5f87e279d8644a39a3 (diff) | |
download | lua-language-server-dbb392e3f3953c6ce821755ad14bc857840f899c.zip |
full support for interface
Diffstat (limited to 'script/parser')
-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') |