summaryrefslogtreecommitdiff
path: root/script/parser/compile.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-07 19:59:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-07 19:59:11 +0800
commitdbb392e3f3953c6ce821755ad14bc857840f899c (patch)
treef2fc91e6497ba29ef599cced40337f5b7e9ca368 /script/parser/compile.lua
parent8ed72a93bc27d86b4a4b5e5f87e279d8644a39a3 (diff)
downloadlua-language-server-dbb392e3f3953c6ce821755ad14bc857840f899c.zip
full support for interface
Diffstat (limited to 'script/parser/compile.lua')
-rw-r--r--script/parser/compile.lua13
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')