summaryrefslogtreecommitdiff
path: root/server-beta/src/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-11-16 00:11:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-11-16 00:11:34 +0800
commit68db6ffa1943bfda316f3e955896f482f1ef109d (patch)
treec9c909fc0fc48327840937fff56a66c4bd144b20 /server-beta/src/parser
parent58bd9dd99cf6f927a318085255e4e18b533eab0d (diff)
downloadlua-language-server-68db6ffa1943bfda316f3e955896f482f1ef109d.zip
修改一些细节
Diffstat (limited to 'server-beta/src/parser')
-rw-r--r--server-beta/src/parser/guide.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/server-beta/src/parser/guide.lua b/server-beta/src/parser/guide.lua
index c96f7143..f1fedbd9 100644
--- a/server-beta/src/parser/guide.lua
+++ b/server-beta/src/parser/guide.lua
@@ -518,14 +518,16 @@ function m.getPath(a, b)
local mode
local objA
local objB
- if a.start < b.start then
+ if a.finish < b.start then
mode = 'before'
objA = a
objB = b
- else
+ elseif a.start > b.finish then
mode = 'after'
objA = b
objB = a
+ else
+ return 'equal', {}, {}
end
local pathA = {}
local pathB = {}