summaryrefslogtreecommitdiff
path: root/server-beta/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-11-08 13:32:44 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-11-08 13:32:44 +0800
commit26d718bba628a337ffeea9e20f2b9af7581af1d7 (patch)
tree918145bfc3f07481c4670c6ee9ff8d0742520afe /server-beta/src
parent2ce73841e83f44212c20bfd997bc1874cda9e3c0 (diff)
downloadlua-language-server-26d718bba628a337ffeea9e20f2b9af7581af1d7.zip
修正一些bug
Diffstat (limited to 'server-beta/src')
-rw-r--r--server-beta/src/core/diagnostics/ambiguity-1.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/server-beta/src/core/diagnostics/ambiguity-1.lua b/server-beta/src/core/diagnostics/ambiguity-1.lua
index ffe43c27..1ebb0d8a 100644
--- a/server-beta/src/core/diagnostics/ambiguity-1.lua
+++ b/server-beta/src/core/diagnostics/ambiguity-1.lua
@@ -42,11 +42,12 @@ return function (uri, callback)
and first.type ~= 'unary'
and not second.op
and literalMap[second.type]
+ and not literalMap[first[2].type]
then
callback {
start = source.start,
finish = source.finish,
- message = lang.script('DIAG_AMBIGUITY_1', text.sub(first.start, first.finish))
+ message = lang.script('DIAG_AMBIGUITY_1', text:sub(first.start, first.finish))
}
end
end
@@ -56,11 +57,12 @@ return function (uri, callback)
and second.type ~= 'unary'
and not first.op
and literalMap[second[1].type]
+ and not literalMap[second[2].type]
then
callback {
start = source.start,
finish = source.finish,
- message = lang.script('DIAG_AMBIGUITY_1', text.sub(second.start, second.finish))
+ message = lang.script('DIAG_AMBIGUITY_1', text:sub(second.start, second.finish))
}
end
end