summaryrefslogtreecommitdiff
path: root/server/src/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-11-29 15:06:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-11-29 15:06:55 +0800
commit5db32ce42188ec69858c34715a8e4f5778ddc9df (patch)
tree876fde365e19d183a9b82b4eb37a448c01811e0e /server/src/parser
parent5a608c99b024b09d295b176c098dd251d782c35d (diff)
downloadlua-language-server-5db32ce42188ec69858c34715a8e4f5778ddc9df.zip
支持set
Diffstat (limited to 'server/src/parser')
-rw-r--r--server/src/parser/ast.lua3
-rw-r--r--server/src/parser/grammar.lua2
2 files changed, 4 insertions, 1 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua
index 9bd406b7..77edeb5e 100644
--- a/server/src/parser/ast.lua
+++ b/server/src/parser/ast.lua
@@ -368,6 +368,9 @@ local defs = {
obj[max-1] = nil
return obj
end,
+ Lua = function (...)
+ return {...}
+ end,
}
return function (self, lua, mode)
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index 0efe4056..e2dad474 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -388,7 +388,7 @@ LocalFunction
]]
grammar 'Lua' [[
-Lua <- (Sp Action)* Sp
+Lua <- (Sp Action)* -> Lua Sp
]]
return function (lua, mode, parser_)