diff options
Diffstat (limited to 'script/core/diagnostics')
35 files changed, 35 insertions, 35 deletions
diff --git a/script/core/diagnostics/ambiguity-1.lua b/script/core/diagnostics/ambiguity-1.lua index 37815fb5..bae39a03 100644 --- a/script/core/diagnostics/ambiguity-1.lua +++ b/script/core/diagnostics/ambiguity-1.lua @@ -25,7 +25,7 @@ local literalMap = { } return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/circle-doc-class.lua b/script/core/diagnostics/circle-doc-class.lua index d2e26378..ae6d4d3b 100644 --- a/script/core/diagnostics/circle-doc-class.lua +++ b/script/core/diagnostics/circle-doc-class.lua @@ -5,7 +5,7 @@ local vm = require 'vm' local guide = require 'parser.guide' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/close-non-object.lua b/script/core/diagnostics/close-non-object.lua index 7828efe9..afd259d0 100644 --- a/script/core/diagnostics/close-non-object.lua +++ b/script/core/diagnostics/close-non-object.lua @@ -3,7 +3,7 @@ local guide = require 'parser.guide' local lang = require 'language' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/code-after-break.lua b/script/core/diagnostics/code-after-break.lua index f300a61a..21f7e83a 100644 --- a/script/core/diagnostics/code-after-break.lua +++ b/script/core/diagnostics/code-after-break.lua @@ -4,7 +4,7 @@ local lang = require 'language' local define = require 'proto.define' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/count-down-loop.lua b/script/core/diagnostics/count-down-loop.lua index ee245781..a16811ab 100644 --- a/script/core/diagnostics/count-down-loop.lua +++ b/script/core/diagnostics/count-down-loop.lua @@ -3,7 +3,7 @@ local guide = require "parser.guide" local lang = require 'language' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) local text = files.getText(uri) if not state or not text then return diff --git a/script/core/diagnostics/deprecated.lua b/script/core/diagnostics/deprecated.lua index a6f8a47e..c60084fb 100644 --- a/script/core/diagnostics/deprecated.lua +++ b/script/core/diagnostics/deprecated.lua @@ -7,7 +7,7 @@ local define = require 'proto.define' local await = require 'await' return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/doc-field-no-class.lua b/script/core/diagnostics/doc-field-no-class.lua index f27bbb32..97603c0b 100644 --- a/script/core/diagnostics/doc-field-no-class.lua +++ b/script/core/diagnostics/doc-field-no-class.lua @@ -2,7 +2,7 @@ local files = require 'files' local lang = require 'language' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/duplicate-doc-class.lua b/script/core/diagnostics/duplicate-doc-class.lua index daecb836..20eedb5e 100644 --- a/script/core/diagnostics/duplicate-doc-class.lua +++ b/script/core/diagnostics/duplicate-doc-class.lua @@ -5,7 +5,7 @@ local vm = require 'vm' local guide = require 'parser.guide' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/duplicate-doc-field.lua b/script/core/diagnostics/duplicate-doc-field.lua index b621fd9e..1ee27ff2 100644 --- a/script/core/diagnostics/duplicate-doc-field.lua +++ b/script/core/diagnostics/duplicate-doc-field.lua @@ -2,7 +2,7 @@ local files = require 'files' local lang = require 'language' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/duplicate-doc-param.lua b/script/core/diagnostics/duplicate-doc-param.lua index 676a6fb4..b54c1978 100644 --- a/script/core/diagnostics/duplicate-doc-param.lua +++ b/script/core/diagnostics/duplicate-doc-param.lua @@ -2,7 +2,7 @@ local files = require 'files' local lang = require 'language' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/duplicate-index.lua b/script/core/diagnostics/duplicate-index.lua index d1ba9261..91a35212 100644 --- a/script/core/diagnostics/duplicate-index.lua +++ b/script/core/diagnostics/duplicate-index.lua @@ -5,7 +5,7 @@ local define = require 'proto.define' local vm = require 'vm' return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/duplicate-set-field.lua b/script/core/diagnostics/duplicate-set-field.lua index e1883fe5..492793b1 100644 --- a/script/core/diagnostics/duplicate-set-field.lua +++ b/script/core/diagnostics/duplicate-set-field.lua @@ -5,7 +5,7 @@ local define = require 'proto.define' local guide = require "parser.guide" return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/empty-block.lua b/script/core/diagnostics/empty-block.lua index 2024f4e3..fc205d7e 100644 --- a/script/core/diagnostics/empty-block.lua +++ b/script/core/diagnostics/empty-block.lua @@ -6,7 +6,7 @@ local define = require 'proto.define' -- 检查空代码块 -- 但是排除忙等待(repeat/while) return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/global-in-nil-env.lua b/script/core/diagnostics/global-in-nil-env.lua index 9a0d4f35..d95963e4 100644 --- a/script/core/diagnostics/global-in-nil-env.lua +++ b/script/core/diagnostics/global-in-nil-env.lua @@ -8,7 +8,7 @@ local function mayRun(path) end return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/init.lua b/script/core/diagnostics/init.lua index 1d1ab9af..e068238e 100644 --- a/script/core/diagnostics/init.lua +++ b/script/core/diagnostics/init.lua @@ -62,7 +62,7 @@ local function check(uri, name, results) end return function (uri, response) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return nil end diff --git a/script/core/diagnostics/lowercase-global.lua b/script/core/diagnostics/lowercase-global.lua index 8c7ae793..cba33459 100644 --- a/script/core/diagnostics/lowercase-global.lua +++ b/script/core/diagnostics/lowercase-global.lua @@ -18,7 +18,7 @@ end -- 不允许定义首字母小写的全局变量(很可能是拼错或者漏删) return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/newfield-call.lua b/script/core/diagnostics/newfield-call.lua index 75681cbc..2cbc13ee 100644 --- a/script/core/diagnostics/newfield-call.lua +++ b/script/core/diagnostics/newfield-call.lua @@ -3,7 +3,7 @@ local guide = require 'parser.guide' local lang = require 'language' return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/newline-call.lua b/script/core/diagnostics/newline-call.lua index 159a60c9..71dc33e2 100644 --- a/script/core/diagnostics/newline-call.lua +++ b/script/core/diagnostics/newline-call.lua @@ -3,7 +3,7 @@ local guide = require 'parser.guide' local lang = require 'language' return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) local lines = files.getLines(uri) local text = files.getText(uri) if not ast or not lines then diff --git a/script/core/diagnostics/no-implicit-any.lua b/script/core/diagnostics/no-implicit-any.lua index ccbb4917..6ff17c81 100644 --- a/script/core/diagnostics/no-implicit-any.lua +++ b/script/core/diagnostics/no-implicit-any.lua @@ -4,7 +4,7 @@ local lang = require 'language' local infer = require 'core.infer' return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/redefined-local.lua b/script/core/diagnostics/redefined-local.lua index 48093417..503347d0 100644 --- a/script/core/diagnostics/redefined-local.lua +++ b/script/core/diagnostics/redefined-local.lua @@ -3,7 +3,7 @@ local guide = require 'parser.guide' local lang = require 'language' return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/redundant-parameter.lua b/script/core/diagnostics/redundant-parameter.lua index eca7fc91..a2e60b71 100644 --- a/script/core/diagnostics/redundant-parameter.lua +++ b/script/core/diagnostics/redundant-parameter.lua @@ -67,7 +67,7 @@ local function getFuncArgs(func) end return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/redundant-value.lua b/script/core/diagnostics/redundant-value.lua index be483448..d6cd97a7 100644 --- a/script/core/diagnostics/redundant-value.lua +++ b/script/core/diagnostics/redundant-value.lua @@ -3,7 +3,7 @@ local define = require 'proto.define' local lang = require 'language' return function (uri, callback, code) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/trailing-space.lua b/script/core/diagnostics/trailing-space.lua index e54a6e60..824eb83f 100644 --- a/script/core/diagnostics/trailing-space.lua +++ b/script/core/diagnostics/trailing-space.lua @@ -13,7 +13,7 @@ local function isInString(ast, offset) end return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/unbalanced-assignments.lua b/script/core/diagnostics/unbalanced-assignments.lua index 35aebb45..df71f0c9 100644 --- a/script/core/diagnostics/unbalanced-assignments.lua +++ b/script/core/diagnostics/unbalanced-assignments.lua @@ -4,7 +4,7 @@ local lang = require 'language' local guide = require 'parser.guide' return function (uri, callback, code) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/undefined-doc-class.lua b/script/core/diagnostics/undefined-doc-class.lua index d79f7ea4..e7133ab9 100644 --- a/script/core/diagnostics/undefined-doc-class.lua +++ b/script/core/diagnostics/undefined-doc-class.lua @@ -5,7 +5,7 @@ local define = require 'proto.define' local vm = require 'vm' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/undefined-doc-name.lua b/script/core/diagnostics/undefined-doc-name.lua index 871f16e1..c7318fcf 100644 --- a/script/core/diagnostics/undefined-doc-name.lua +++ b/script/core/diagnostics/undefined-doc-name.lua @@ -5,7 +5,7 @@ local define = require 'proto.define' local vm = require 'vm' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/undefined-doc-param.lua b/script/core/diagnostics/undefined-doc-param.lua index 4a97947d..6140b4f0 100644 --- a/script/core/diagnostics/undefined-doc-param.lua +++ b/script/core/diagnostics/undefined-doc-param.lua @@ -17,7 +17,7 @@ local function hasParamName(func, name) end return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/undefined-env-child.lua b/script/core/diagnostics/undefined-env-child.lua index ea9d1c4c..39c8de27 100644 --- a/script/core/diagnostics/undefined-env-child.lua +++ b/script/core/diagnostics/undefined-env-child.lua @@ -5,7 +5,7 @@ local lang = require 'language' local vm = require "vm.vm" return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/undefined-field.lua b/script/core/diagnostics/undefined-field.lua index 2d357d5b..9d1f696c 100644 --- a/script/core/diagnostics/undefined-field.lua +++ b/script/core/diagnostics/undefined-field.lua @@ -13,7 +13,7 @@ local SkipCheckClass = { } return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/undefined-global.lua b/script/core/diagnostics/undefined-global.lua index 825b14f1..549a1922 100644 --- a/script/core/diagnostics/undefined-global.lua +++ b/script/core/diagnostics/undefined-global.lua @@ -12,7 +12,7 @@ local requireLike = { } return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/unknown-diag-code.lua b/script/core/diagnostics/unknown-diag-code.lua index 45d3b6db..013a702b 100644 --- a/script/core/diagnostics/unknown-diag-code.lua +++ b/script/core/diagnostics/unknown-diag-code.lua @@ -3,7 +3,7 @@ local lang = require 'language' local define = require 'proto.define' return function (uri, callback) - local state = files.getAst(uri) + local state = files.getState(uri) if not state then return end diff --git a/script/core/diagnostics/unused-function.lua b/script/core/diagnostics/unused-function.lua index 41c239f9..59f27e59 100644 --- a/script/core/diagnostics/unused-function.lua +++ b/script/core/diagnostics/unused-function.lua @@ -19,7 +19,7 @@ local function isToBeClosed(source) end return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/unused-label.lua b/script/core/diagnostics/unused-label.lua index e6d998ba..8ee0bba3 100644 --- a/script/core/diagnostics/unused-label.lua +++ b/script/core/diagnostics/unused-label.lua @@ -4,7 +4,7 @@ local define = require 'proto.define' local lang = require 'language' return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/unused-local.lua b/script/core/diagnostics/unused-local.lua index 1a77a45f..072cbd31 100644 --- a/script/core/diagnostics/unused-local.lua +++ b/script/core/diagnostics/unused-local.lua @@ -77,7 +77,7 @@ local function isDocParam(source) end return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end diff --git a/script/core/diagnostics/unused-vararg.lua b/script/core/diagnostics/unused-vararg.lua index 74cc08e7..2e07e1ee 100644 --- a/script/core/diagnostics/unused-vararg.lua +++ b/script/core/diagnostics/unused-vararg.lua @@ -4,7 +4,7 @@ local define = require 'proto.define' local lang = require 'language' return function (uri, callback) - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return end |