summaryrefslogtreecommitdiff
path: root/server/src/parser/ast.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-06-28 15:01:16 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-06-28 15:01:16 +0800
commitdaee93fb17e8f206e63ab8573566762011a3f1cd (patch)
tree899636477d8afb30b7dbfe995ef9fa8a76239919 /server/src/parser/ast.lua
parentf6a6e9f9d36d34c542c721db41a4e9770bcebcf7 (diff)
downloadlua-language-server-daee93fb17e8f206e63ab8573566762011a3f1cd.zip
修改enum的语法
Diffstat (limited to 'server/src/parser/ast.lua')
-rw-r--r--server/src/parser/ast.lua15
1 files changed, 7 insertions, 8 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua
index f9a6d53d..08f7fdd3 100644
--- a/server/src/parser/ast.lua
+++ b/server/src/parser/ast.lua
@@ -1335,14 +1335,13 @@ local Defs = {
end
return option
end,
- EmmyTypeEnum = function (enum, option)
- return {
- type = 'emmyEnum',
- option = option,
- start = enum.start,
- finish = enum.finish,
- [1] = enum,
- }
+ EmmyTypeEnum = function (default, enum, comment)
+ enum.type = 'emmyEnum'
+ if default ~= '' then
+ enum.default = true
+ end
+ enum.comment = comment
+ return enum
end,
-- 捕获错误