summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/hover/hover.lua4
-rw-r--r--server/src/parser/ast.lua4
-rw-r--r--server/src/parser/grammar.lua2
3 files changed, 6 insertions, 4 deletions
diff --git a/server/src/core/hover/hover.lua b/server/src/core/hover/hover.lua
index d78b8add..dbbafc30 100644
--- a/server/src/core/hover/hover.lua
+++ b/server/src/core/hover/hover.lua
@@ -208,13 +208,15 @@ local function getValueHover(source, name, value, lib)
local loc = source:bindLocal()
if loc.tags then
local mark = {}
+ local tagBufs = {}
for _, tag in ipairs(loc.tags) do
local tagName = tag[1]
if not mark[tagName] then
mark[tagName] = true
- tp = ('%s <%s>'):format(tp, tagName)
+ tagBufs[#tagBufs+1] = ('<%s>'):format(tagName)
end
end
+ name = name .. ' ' .. table.concat(tagBufs, ' ')
end
tips[#tips+1] = loc:getComment()
elseif source:get 'global' then
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua
index 0be0027d..a67a16cb 100644
--- a/server/src/parser/ast.lua
+++ b/server/src/parser/ast.lua
@@ -974,7 +974,7 @@ local Defs = {
version = State.Version,
}
}
- elseif tag[1] ~= 'const' and tag[1] ~= 'toclose' then
+ elseif tag[1] ~= 'const' and tag[1] ~= 'close' then
pushError {
type = 'UNKNOWN_TAG',
start = tag.start,
@@ -996,7 +996,7 @@ local Defs = {
end
return tags
end,
- LocalName = function (tags, name)
+ LocalName = function (name, tags)
name.tags = tags
return name
end,
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index aa44a3ce..5183803b 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -500,7 +500,7 @@ Set <- (SimpleList AssignOrEQ ExpList?)
LocalNameList
<- (LocalName (COMMA LocalName)*)
-> List
-LocalName <- (LocalTag MustName)
+LocalName <- (MustName LocalTag)
-> LocalName
Call <- Simple