diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-20 21:57:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-20 21:57:09 +0800 |
commit | 4ca61ec457822dd14966afa0752340ae8ce180a1 (patch) | |
tree | ae8adb1ad82c717868e551e699fd3cf3bb290089 /script-beta/core/diagnostics/newline-call.lua | |
parent | c63b2e404d8d2bb984afe3678a5ba2b2836380cc (diff) | |
download | lua-language-server-4ca61ec457822dd14966afa0752340ae8ce180a1.zip |
no longer beta
Diffstat (limited to 'script-beta/core/diagnostics/newline-call.lua')
-rw-r--r-- | script-beta/core/diagnostics/newline-call.lua | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/script-beta/core/diagnostics/newline-call.lua b/script-beta/core/diagnostics/newline-call.lua deleted file mode 100644 index cb318380..00000000 --- a/script-beta/core/diagnostics/newline-call.lua +++ /dev/null @@ -1,38 +0,0 @@ -local files = require 'files' -local guide = require 'parser.guide' -local lang = require 'language' - -return function (uri, callback) - local ast = files.getAst(uri) - if not ast then - return - end - local lines = files.getLines(uri) - - guide.eachSourceType(ast.ast, 'call', function (source) - local node = source.node - local args = source.args - if not args then - return - end - - -- 必须有其他人在继续使用当前对象 - if not source.next then - return - end - - local nodeRow = guide.positionOf(lines, node.finish) - local argRow = guide.positionOf(lines, args.start) - if nodeRow == argRow then - return - end - - if #args == 1 then - callback { - start = args.start, - finish = args.finish, - message = lang.script.DIAG_PREVIOUS_CALL, - } - end - end) -end |