summaryrefslogtreecommitdiff
path: root/server/src/parser/ast.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-07-10 21:59:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-07-10 21:59:11 +0800
commita9335f9a6477d267928c62776f61fabcaa7bcc66 (patch)
treed7e25e273b5ec2d259f65843734175e330d44e4b /server/src/parser/ast.lua
parentb6a99fe50a46812696848f0ad68bd4ef343dc9b3 (diff)
downloadlua-language-server-a9335f9a6477d267928c62776f61fabcaa7bcc66.zip
更新arrayType语法
Diffstat (limited to 'server/src/parser/ast.lua')
-rw-r--r--server/src/parser/ast.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua
index 52b34343..1d44c848 100644
--- a/server/src/parser/ast.lua
+++ b/server/src/parser/ast.lua
@@ -1211,9 +1211,11 @@ local Defs = {
result.finish = result[#result].finish
return result
end,
- EmmyArrayType = function (typeName)
- typeName.type = 'emmyArrayType'
- return typeName
+ EmmyArrayType = function (start, emmy, _, finish)
+ emmy.type = 'emmyArrayType'
+ emmy.start = start
+ emmy.finish = finish - 1
+ return emmy
end,
EmmyTableType = function (start, keyType, valueType, finish)
return {
@@ -1238,7 +1240,9 @@ local Defs = {
return {...}
end,
EmmyFunctionArgs = function (...)
- return {...}
+ local args = {...}
+ args[#args] = nil
+ return args
end,
EmmyAlias = function (name, emmyName, ...)
return {