summaryrefslogtreecommitdiff
path: root/server/src/method/workspace/executeCommand.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-07-09 16:07:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-07-09 16:07:32 +0800
commitb6a99fe50a46812696848f0ad68bd4ef343dc9b3 (patch)
tree1b49eefe02be68a38cb1a81de1a53942b1635b2c /server/src/method/workspace/executeCommand.lua
parentbd30197133b5c6ccb3dc977826646fc30e6a1ef2 (diff)
downloadlua-language-server-b6a99fe50a46812696848f0ad68bd4ef343dc9b3.zip
修正歧义识别bug
Diffstat (limited to 'server/src/method/workspace/executeCommand.lua')
-rw-r--r--server/src/method/workspace/executeCommand.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/src/method/workspace/executeCommand.lua b/server/src/method/workspace/executeCommand.lua
index 95d90fec..b622ec11 100644
--- a/server/src/method/workspace/executeCommand.lua
+++ b/server/src/method/workspace/executeCommand.lua
@@ -167,6 +167,7 @@ function command.solve(lsp, data)
-- (a + b) or 0 --> a + (b or 0)
do
if opMap[first.op]
+ and first.type ~= 'unary'
and not second.op
and literalMap[second.type]
then
@@ -179,6 +180,7 @@ function command.solve(lsp, data)
-- a or (b + c) --> (a or b) + c
do
if opMap[second.op]
+ and second.type ~= 'unary'
and not first.op
and literalMap[second[1].type]
then