summaryrefslogtreecommitdiff
path: root/server/src/parser/ast.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-19 14:16:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-19 14:16:18 +0800
commitca5deb5333d8be7dae9a2b4e4f83d7650601dad0 (patch)
tree7919a466645b41fab6739b49eb0277a39b5b3966 /server/src/parser/ast.lua
parent2aca34e65556b3428f4596906dfa6aa7a639c7b5 (diff)
downloadlua-language-server-ca5deb5333d8be7dae9a2b4e4f83d7650601dad0.zip
先接上协议
Diffstat (limited to 'server/src/parser/ast.lua')
-rw-r--r--server/src/parser/ast.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua
index f2356531..5e6b9fcf 100644
--- a/server/src/parser/ast.lua
+++ b/server/src/parser/ast.lua
@@ -71,10 +71,14 @@ local defs = {
end,
Simple = function (first, ...)
if ... then
- return {
+ local obj = {
type = 'simple',
+ start = first.start,
first, ...,
}
+ local last = obj[#obj]
+ obj.finish = last.finish
+ return obj
elseif first == '' then
return nil
else