diff options
Diffstat (limited to 'server-beta/src')
-rw-r--r-- | server-beta/src/core/diagnostics/redundant-parameter.lua | 2 | ||||
-rw-r--r-- | server-beta/src/parser/guide.lua | 6 | ||||
-rw-r--r-- | server-beta/src/searcher/getLibrary.lua | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/server-beta/src/core/diagnostics/redundant-parameter.lua b/server-beta/src/core/diagnostics/redundant-parameter.lua index 43bb93ed..a60c8cdb 100644 --- a/server-beta/src/core/diagnostics/redundant-parameter.lua +++ b/server-beta/src/core/diagnostics/redundant-parameter.lua @@ -66,7 +66,7 @@ return function (uri, callback) local func = source.node local funcArgs - searcher.eachRef(func, function (info) + searcher.eachDef(func, function (info) if info.mode == 'value' then local src = info.source if src.type == 'function' then 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 = {} diff --git a/server-beta/src/searcher/getLibrary.lua b/server-beta/src/searcher/getLibrary.lua index afedde64..b920387d 100644 --- a/server-beta/src/searcher/getLibrary.lua +++ b/server-beta/src/searcher/getLibrary.lua @@ -1,5 +1,4 @@ local searcher = require 'searcher.searcher' -local guide = require 'parser.guide' local library = require 'library' local function getLibrary(source) |