summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-15 10:45:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-15 10:45:49 +0800
commitba041ed17bac8a00a0e83ee289e7a257bf6f3d8b (patch)
tree928c7b5b9d6328a9f3f1fad83ab3e0d88ec05d0e
parent1fa9ad87670ca2f6a27a708f6f039ed398e9fa2a (diff)
downloadlua-language-server-ba041ed17bac8a00a0e83ee289e7a257bf6f3d8b.zip
move `parser/guide.lua` to `core/guide.lua`
-rw-r--r--script/core/code-action.lua2
-rw-r--r--script/core/command/removeSpace.lua2
-rw-r--r--script/core/command/solve.lua2
-rw-r--r--script/core/completion.lua2
-rw-r--r--script/core/definition.lua2
-rw-r--r--script/core/diagnostics/ambiguity-1.lua2
-rw-r--r--script/core/diagnostics/circle-doc-class.lua2
-rw-r--r--script/core/diagnostics/close-non-object.lua2
-rw-r--r--script/core/diagnostics/code-after-break.lua2
-rw-r--r--script/core/diagnostics/count-down-loop.lua2
-rw-r--r--script/core/diagnostics/duplicate-doc-class.lua2
-rw-r--r--script/core/diagnostics/duplicate-index.lua2
-rw-r--r--script/core/diagnostics/duplicate-set-field.lua2
-rw-r--r--script/core/diagnostics/empty-block.lua2
-rw-r--r--script/core/diagnostics/global-in-nil-env.lua2
-rw-r--r--script/core/diagnostics/lowercase-global.lua2
-rw-r--r--script/core/diagnostics/newfield-call.lua2
-rw-r--r--script/core/diagnostics/newline-call.lua2
-rw-r--r--script/core/diagnostics/no-implicit-any.lua2
-rw-r--r--script/core/diagnostics/redefined-local.lua2
-rw-r--r--script/core/diagnostics/redundant-parameter.lua2
-rw-r--r--script/core/diagnostics/trailing-space.lua2
-rw-r--r--script/core/diagnostics/unbalanced-assignments.lua2
-rw-r--r--script/core/diagnostics/undefined-doc-class.lua2
-rw-r--r--script/core/diagnostics/undefined-doc-name.lua2
-rw-r--r--script/core/diagnostics/undefined-doc-param.lua2
-rw-r--r--script/core/diagnostics/undefined-env-child.lua2
-rw-r--r--script/core/diagnostics/undefined-field.lua2
-rw-r--r--script/core/diagnostics/undefined-global.lua2
-rw-r--r--script/core/diagnostics/unused-function.lua2
-rw-r--r--script/core/diagnostics/unused-label.lua2
-rw-r--r--script/core/diagnostics/unused-local.lua2
-rw-r--r--script/core/diagnostics/unused-vararg.lua2
-rw-r--r--script/core/document-symbol.lua2
-rw-r--r--script/core/find-source.lua2
-rw-r--r--script/core/folding.lua2
-rw-r--r--script/core/guide.lua (renamed from script/parser/guide.lua)50
-rw-r--r--script/core/highlight.lua2
-rw-r--r--script/core/hint.lua2
-rw-r--r--script/core/hover/arg.lua2
-rw-r--r--script/core/hover/description.lua2
-rw-r--r--script/core/hover/init.lua2
-rw-r--r--script/core/hover/label.lua2
-rw-r--r--script/core/hover/name.lua2
-rw-r--r--script/core/hover/return.lua2
-rw-r--r--script/core/hover/table.lua2
-rw-r--r--script/core/keyword.lua2
-rw-r--r--script/core/reference.lua2
-rw-r--r--script/core/rename.lua2
-rw-r--r--script/core/semantic-tokens.lua2
-rw-r--r--script/core/signature.lua2
-rw-r--r--script/core/type-formatting.lua2
-rw-r--r--script/core/workspace-symbol.lua2
-rw-r--r--script/files.lua2
-rw-r--r--script/parser/compile.lua2
-rw-r--r--script/parser/init.lua2
-rw-r--r--script/parser/luadoc.lua2
-rw-r--r--script/proto/define.lua2
-rw-r--r--script/vm/eachDef.lua2
-rw-r--r--script/vm/eachField.lua2
-rw-r--r--script/vm/eachRef.lua2
-rw-r--r--script/vm/getClass.lua2
-rw-r--r--script/vm/getDocs.lua2
-rw-r--r--script/vm/getGlobals.lua2
-rw-r--r--script/vm/getInfer.lua2
-rw-r--r--script/vm/getLinks.lua2
-rw-r--r--script/vm/guideInterface.lua2
-rw-r--r--script/vm/vm.lua2
-rw-r--r--test.lua2
-rw-r--r--test/type_inference/init.lua2
70 files changed, 94 insertions, 94 deletions
diff --git a/script/core/code-action.lua b/script/core/code-action.lua
index 6929d75a..bae3df81 100644
--- a/script/core/code-action.lua
+++ b/script/core/code-action.lua
@@ -1,7 +1,7 @@
local files = require 'files'
local lang = require 'language'
local define = require 'proto.define'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local util = require 'utility'
local sp = require 'bee.subprocess'
local vm = require 'vm'
diff --git a/script/core/command/removeSpace.lua b/script/core/command/removeSpace.lua
index 29513951..527af8d5 100644
--- a/script/core/command/removeSpace.lua
+++ b/script/core/command/removeSpace.lua
@@ -1,6 +1,6 @@
local files = require 'files'
local define = require 'proto.define'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local proto = require 'proto'
local lang = require 'language'
diff --git a/script/core/command/solve.lua b/script/core/command/solve.lua
index 3e110d7c..995a2109 100644
--- a/script/core/command/solve.lua
+++ b/script/core/command/solve.lua
@@ -1,6 +1,6 @@
local files = require 'files'
local define = require 'proto.define'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local proto = require 'proto'
local lang = require 'language'
diff --git a/script/core/completion.lua b/script/core/completion.lua
index fa5bbda6..9eb02832 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -1,6 +1,6 @@
local define = require 'proto.define'
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local matchKey = require 'core.matchkey'
local vm = require 'vm'
local getLabel = require 'core.hover.label'
diff --git a/script/core/definition.lua b/script/core/definition.lua
index 0ea20a02..b8e5fdb0 100644
--- a/script/core/definition.lua
+++ b/script/core/definition.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local workspace = require 'workspace'
local files = require 'files'
local vm = require 'vm'
diff --git a/script/core/diagnostics/ambiguity-1.lua b/script/core/diagnostics/ambiguity-1.lua
index 37815fb5..19bb4f97 100644
--- a/script/core/diagnostics/ambiguity-1.lua
+++ b/script/core/diagnostics/ambiguity-1.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local opMap = {
diff --git a/script/core/diagnostics/circle-doc-class.lua b/script/core/diagnostics/circle-doc-class.lua
index f3721fd9..702cd904 100644
--- a/script/core/diagnostics/circle-doc-class.lua
+++ b/script/core/diagnostics/circle-doc-class.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
local vm = require 'vm'
diff --git a/script/core/diagnostics/close-non-object.lua b/script/core/diagnostics/close-non-object.lua
index cfefb037..d1983c42 100644
--- a/script/core/diagnostics/close-non-object.lua
+++ b/script/core/diagnostics/close-non-object.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
diff --git a/script/core/diagnostics/code-after-break.lua b/script/core/diagnostics/code-after-break.lua
index a2bac8a4..f23755ea 100644
--- a/script/core/diagnostics/code-after-break.lua
+++ b/script/core/diagnostics/code-after-break.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
diff --git a/script/core/diagnostics/count-down-loop.lua b/script/core/diagnostics/count-down-loop.lua
index 8cd26dcd..65099af8 100644
--- a/script/core/diagnostics/count-down-loop.lua
+++ b/script/core/diagnostics/count-down-loop.lua
@@ -1,5 +1,5 @@
local files = require "files"
-local guide = require "parser.guide"
+local guide = require "core.guide"
local lang = require 'language'
return function (uri, callback)
diff --git a/script/core/diagnostics/duplicate-doc-class.lua b/script/core/diagnostics/duplicate-doc-class.lua
index 4751d28e..8c6696a9 100644
--- a/script/core/diagnostics/duplicate-doc-class.lua
+++ b/script/core/diagnostics/duplicate-doc-class.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
local vm = require 'vm'
diff --git a/script/core/diagnostics/duplicate-index.lua b/script/core/diagnostics/duplicate-index.lua
index 3cf4faef..5e63d39e 100644
--- a/script/core/diagnostics/duplicate-index.lua
+++ b/script/core/diagnostics/duplicate-index.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
local vm = require 'vm'
diff --git a/script/core/diagnostics/duplicate-set-field.lua b/script/core/diagnostics/duplicate-set-field.lua
index 83b7f21a..c1e2285a 100644
--- a/script/core/diagnostics/duplicate-set-field.lua
+++ b/script/core/diagnostics/duplicate-set-field.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
local vm = require 'vm'
diff --git a/script/core/diagnostics/empty-block.lua b/script/core/diagnostics/empty-block.lua
index 2024f4e3..690a4ca2 100644
--- a/script/core/diagnostics/empty-block.lua
+++ b/script/core/diagnostics/empty-block.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
diff --git a/script/core/diagnostics/global-in-nil-env.lua b/script/core/diagnostics/global-in-nil-env.lua
index 9a0d4f35..de23bc76 100644
--- a/script/core/diagnostics/global-in-nil-env.lua
+++ b/script/core/diagnostics/global-in-nil-env.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
-- TODO: 检查路径是否可达
diff --git a/script/core/diagnostics/lowercase-global.lua b/script/core/diagnostics/lowercase-global.lua
index 8c7ae793..9c094701 100644
--- a/script/core/diagnostics/lowercase-global.lua
+++ b/script/core/diagnostics/lowercase-global.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local config = require 'config'
local vm = require 'vm'
diff --git a/script/core/diagnostics/newfield-call.lua b/script/core/diagnostics/newfield-call.lua
index 75681cbc..0727c2fd 100644
--- a/script/core/diagnostics/newfield-call.lua
+++ b/script/core/diagnostics/newfield-call.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
return function (uri, callback)
diff --git a/script/core/diagnostics/newline-call.lua b/script/core/diagnostics/newline-call.lua
index ee08cc35..c2c8bd66 100644
--- a/script/core/diagnostics/newline-call.lua
+++ b/script/core/diagnostics/newline-call.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
return function (uri, callback)
diff --git a/script/core/diagnostics/no-implicit-any.lua b/script/core/diagnostics/no-implicit-any.lua
index a2062b37..ffaab821 100644
--- a/script/core/diagnostics/no-implicit-any.lua
+++ b/script/core/diagnostics/no-implicit-any.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
local vm = require 'vm'
diff --git a/script/core/diagnostics/redefined-local.lua b/script/core/diagnostics/redefined-local.lua
index 5e53d837..857d80d2 100644
--- a/script/core/diagnostics/redefined-local.lua
+++ b/script/core/diagnostics/redefined-local.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
return function (uri, callback)
diff --git a/script/core/diagnostics/redundant-parameter.lua b/script/core/diagnostics/redundant-parameter.lua
index f7b0ae75..fc446f7c 100644
--- a/script/core/diagnostics/redundant-parameter.lua
+++ b/script/core/diagnostics/redundant-parameter.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local vm = require 'vm'
local lang = require 'language'
local define = require 'proto.define'
diff --git a/script/core/diagnostics/trailing-space.lua b/script/core/diagnostics/trailing-space.lua
index e54a6e60..0a4b1d57 100644
--- a/script/core/diagnostics/trailing-space.lua
+++ b/script/core/diagnostics/trailing-space.lua
@@ -1,6 +1,6 @@
local files = require 'files'
local lang = require 'language'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local function isInString(ast, offset)
local result = false
diff --git a/script/core/diagnostics/unbalanced-assignments.lua b/script/core/diagnostics/unbalanced-assignments.lua
index 35aebb45..b2b2800c 100644
--- a/script/core/diagnostics/unbalanced-assignments.lua
+++ b/script/core/diagnostics/unbalanced-assignments.lua
@@ -1,7 +1,7 @@
local files = require 'files'
local define = require 'proto.define'
local lang = require 'language'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
return function (uri, callback, code)
local ast = files.getAst(uri)
diff --git a/script/core/diagnostics/undefined-doc-class.lua b/script/core/diagnostics/undefined-doc-class.lua
index 7d23971a..a91cfa7f 100644
--- a/script/core/diagnostics/undefined-doc-class.lua
+++ b/script/core/diagnostics/undefined-doc-class.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
local vm = require 'vm'
diff --git a/script/core/diagnostics/undefined-doc-name.lua b/script/core/diagnostics/undefined-doc-name.lua
index 62446bb3..d8a4363b 100644
--- a/script/core/diagnostics/undefined-doc-name.lua
+++ b/script/core/diagnostics/undefined-doc-name.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
local vm = require 'vm'
diff --git a/script/core/diagnostics/undefined-doc-param.lua b/script/core/diagnostics/undefined-doc-param.lua
index af3e07bc..0bf371e5 100644
--- a/script/core/diagnostics/undefined-doc-param.lua
+++ b/script/core/diagnostics/undefined-doc-param.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local define = require 'proto.define'
local vm = require 'vm'
diff --git a/script/core/diagnostics/undefined-env-child.lua b/script/core/diagnostics/undefined-env-child.lua
index 6b8c62f0..89efb8c7 100644
--- a/script/core/diagnostics/undefined-env-child.lua
+++ b/script/core/diagnostics/undefined-env-child.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local vm = require 'vm'
local lang = require 'language'
diff --git a/script/core/diagnostics/undefined-field.lua b/script/core/diagnostics/undefined-field.lua
index ffa70364..b10c9ab0 100644
--- a/script/core/diagnostics/undefined-field.lua
+++ b/script/core/diagnostics/undefined-field.lua
@@ -2,7 +2,7 @@ local files = require 'files'
local vm = require 'vm'
local lang = require 'language'
local config = require 'config'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local define = require 'proto.define'
return function (uri, callback)
diff --git a/script/core/diagnostics/undefined-global.lua b/script/core/diagnostics/undefined-global.lua
index 5d647993..cce08319 100644
--- a/script/core/diagnostics/undefined-global.lua
+++ b/script/core/diagnostics/undefined-global.lua
@@ -2,7 +2,7 @@ local files = require 'files'
local vm = require 'vm'
local lang = require 'language'
local config = require 'config'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local define = require 'proto.define'
local requireLike = {
diff --git a/script/core/diagnostics/unused-function.lua b/script/core/diagnostics/unused-function.lua
index 41c239f9..b6f92e60 100644
--- a/script/core/diagnostics/unused-function.lua
+++ b/script/core/diagnostics/unused-function.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local vm = require 'vm'
local define = require 'proto.define'
local lang = require 'language'
diff --git a/script/core/diagnostics/unused-label.lua b/script/core/diagnostics/unused-label.lua
index e6d998ba..e2d5e49a 100644
--- a/script/core/diagnostics/unused-label.lua
+++ b/script/core/diagnostics/unused-label.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local define = require 'proto.define'
local lang = require 'language'
diff --git a/script/core/diagnostics/unused-local.lua b/script/core/diagnostics/unused-local.lua
index 9bb2c492..fde90cb8 100644
--- a/script/core/diagnostics/unused-local.lua
+++ b/script/core/diagnostics/unused-local.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local define = require 'proto.define'
local lang = require 'language'
diff --git a/script/core/diagnostics/unused-vararg.lua b/script/core/diagnostics/unused-vararg.lua
index 74cc08e7..ec0a05fb 100644
--- a/script/core/diagnostics/unused-vararg.lua
+++ b/script/core/diagnostics/unused-vararg.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local define = require 'proto.define'
local lang = require 'language'
diff --git a/script/core/document-symbol.lua b/script/core/document-symbol.lua
index 3bfc744c..fead4153 100644
--- a/script/core/document-symbol.lua
+++ b/script/core/document-symbol.lua
@@ -1,6 +1,6 @@
local await = require 'await'
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local define = require 'proto.define'
local util = require 'utility'
diff --git a/script/core/find-source.lua b/script/core/find-source.lua
index edbb1e2c..b36306b6 100644
--- a/script/core/find-source.lua
+++ b/script/core/find-source.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local function isValidFunctionPos(source, offset)
for i = 1, #source.keyword // 2 do
diff --git a/script/core/folding.lua b/script/core/folding.lua
index ae69d8c3..77cb39e7 100644
--- a/script/core/folding.lua
+++ b/script/core/folding.lua
@@ -1,5 +1,5 @@
local files = require "files"
-local guide = require "parser.guide"
+local guide = require "core.guide"
local Care = {
['function'] = function (source, text, results)
diff --git a/script/parser/guide.lua b/script/core/guide.lua
index 377b2823..c05d5fb0 100644
--- a/script/parser/guide.lua
+++ b/script/core/guide.lua
@@ -23,7 +23,7 @@ local DEVELOP = _G.DEVELOP
local log = log
local _G = _G
----@class parser.guide.object
+---@class core.guide.object
local function logWarn(...)
log.warn(...)
@@ -139,7 +139,7 @@ local TypeSort = {
local NIL = setmetatable({'<nil>'}, { __tostring = function () return 'nil' end })
--- 是否是字面量
----@param obj parser.guide.object
+---@param obj core.guide.object
---@return boolean
function m.isLiteral(obj)
local tp = obj.type
@@ -152,7 +152,7 @@ function m.isLiteral(obj)
end
--- 获取字面量
----@param obj parser.guide.object
+---@param obj core.guide.object
---@return any
function m.getLiteral(obj)
local tp = obj.type
@@ -167,8 +167,8 @@ function m.getLiteral(obj)
end
--- 寻找父函数
----@param obj parser.guide.object
----@return parser.guide.object
+---@param obj core.guide.object
+---@return core.guide.object
function m.getParentFunction(obj)
for _ = 1, 1000 do
obj = obj.parent
@@ -184,8 +184,8 @@ function m.getParentFunction(obj)
end
--- 寻找父的table类型 doc.type.table
----@param obj parser.guide.object
----@return parser.guide.object
+---@param obj core.guide.object
+---@return core.guide.object
function m.getParentDocTypeTable(obj)
for _ = 1, 1000 do
local parent = obj.parent
@@ -201,8 +201,8 @@ function m.getParentDocTypeTable(obj)
end
--- 寻找所在区块
----@param obj parser.guide.object
----@return parser.guide.object
+---@param obj core.guide.object
+---@return core.guide.object
function m.getBlock(obj)
for _ = 1, 1000 do
if not obj then
@@ -221,8 +221,8 @@ function m.getBlock(obj)
end
--- 寻找所在父区块
----@param obj parser.guide.object
----@return parser.guide.object
+---@param obj core.guide.object
+---@return core.guide.object
function m.getParentBlock(obj)
for _ = 1, 1000 do
obj = obj.parent
@@ -238,8 +238,8 @@ function m.getParentBlock(obj)
end
--- 寻找所在可break的父区块
----@param obj parser.guide.object
----@return parser.guide.object
+---@param obj core.guide.object
+---@return core.guide.object
function m.getBreakBlock(obj)
for _ = 1, 1000 do
obj = obj.parent
@@ -258,8 +258,8 @@ function m.getBreakBlock(obj)
end
--- 寻找doc的主体
----@param obj parser.guide.object
----@return parser.guide.object
+---@param obj core.guide.object
+---@return core.guide.object
function m.getDocState(obj)
for _ = 1, 1000 do
local parent = obj.parent
@@ -275,8 +275,8 @@ function m.getDocState(obj)
end
--- 寻找所在父类型
----@param obj parser.guide.object
----@return parser.guide.object
+---@param obj core.guide.object
+---@return core.guide.object
function m.getParentType(obj, want)
for _ = 1, 1000 do
obj = obj.parent
@@ -291,8 +291,8 @@ function m.getParentType(obj, want)
end
--- 寻找根区块
----@param obj parser.guide.object
----@return parser.guide.object
+---@param obj core.guide.object
+---@return core.guide.object
function m.getRoot(obj)
for _ = 1, 1000 do
if obj.type == 'main' then
@@ -307,7 +307,7 @@ function m.getRoot(obj)
error('guide.getRoot overstack')
end
----@param obj parser.guide.object
+---@param obj core.guide.object
---@return string
function m.getUri(obj)
if obj.uri then
@@ -1276,12 +1276,12 @@ function m.getSimple(obj, max)
end
---Create a new status
----@param parentStatus parser.guide.status
+---@param parentStatus core.guide.status
---@param interface table
---@param deep boolean
----@return parser.guide.status
+---@return core.guide.status
function m.status(parentStatus, interface, deep)
- ---@class parser.guide.status
+ ---@class core.guide.status
local status = {
share = parentStatus and parentStatus.share or {
count = 0,
@@ -1503,8 +1503,8 @@ function m.searchDefFields(status, obj, key)
m.cleanResults(status.results)
end
----@param obj parser.guide.object
----@return parser.guide.object
+---@param obj core.guide.object
+---@return core.guide.object
function m.getObjectValue(obj)
while obj.type == 'paren' do
obj = obj.exp
diff --git a/script/core/highlight.lua b/script/core/highlight.lua
index 07481927..01f9178a 100644
--- a/script/core/highlight.lua
+++ b/script/core/highlight.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local files = require 'files'
local vm = require 'vm'
local define = require 'proto.define'
diff --git a/script/core/hint.lua b/script/core/hint.lua
index 737d03aa..f2ef772d 100644
--- a/script/core/hint.lua
+++ b/script/core/hint.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local vm = require 'vm'
local config = require 'config'
diff --git a/script/core/hover/arg.lua b/script/core/hover/arg.lua
index 1fded40e..e8939034 100644
--- a/script/core/hover/arg.lua
+++ b/script/core/hover/arg.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local vm = require 'vm'
local function optionalArg(arg)
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua
index 7c2af81f..a8e98b29 100644
--- a/script/core/hover/description.lua
+++ b/script/core/hover/description.lua
@@ -2,7 +2,7 @@ local vm = require 'vm'
local ws = require 'workspace'
local furi = require 'file-uri'
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local markdown = require 'provider.markdown'
local config = require 'config'
local lang = require 'language'
diff --git a/script/core/hover/init.lua b/script/core/hover/init.lua
index f358357b..9c08ad7e 100644
--- a/script/core/hover/init.lua
+++ b/script/core/hover/init.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local vm = require 'vm'
local getLabel = require 'core.hover.label'
local getDesc = require 'core.hover.description'
diff --git a/script/core/hover/label.lua b/script/core/hover/label.lua
index b486dce6..d93b14e3 100644
--- a/script/core/hover/label.lua
+++ b/script/core/hover/label.lua
@@ -4,7 +4,7 @@ local buildReturn = require 'core.hover.return'
local buildTable = require 'core.hover.table'
local vm = require 'vm'
local util = require 'utility'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local lang = require 'language'
local config = require 'config'
local files = require 'files'
diff --git a/script/core/hover/name.lua b/script/core/hover/name.lua
index 7a8f951c..d583f1e1 100644
--- a/script/core/hover/name.lua
+++ b/script/core/hover/name.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local vm = require 'vm'
local buildName
diff --git a/script/core/hover/return.lua b/script/core/hover/return.lua
index 0ad39970..c3e9656d 100644
--- a/script/core/hover/return.lua
+++ b/script/core/hover/return.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local vm = require 'vm'
local function mergeTypes(returns)
diff --git a/script/core/hover/table.lua b/script/core/hover/table.lua
index f46e722e..edb7751b 100644
--- a/script/core/hover/table.lua
+++ b/script/core/hover/table.lua
@@ -1,6 +1,6 @@
local vm = require 'vm'
local util = require 'utility'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local config = require 'config'
local lang = require 'language'
diff --git a/script/core/keyword.lua b/script/core/keyword.lua
index d35bad75..5c5e291c 100644
--- a/script/core/keyword.lua
+++ b/script/core/keyword.lua
@@ -1,5 +1,5 @@
local define = require 'proto.define'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local keyWordMap = {
{'do', function (hasSpace, isExp, results)
diff --git a/script/core/reference.lua b/script/core/reference.lua
index 64dd6268..63d98303 100644
--- a/script/core/reference.lua
+++ b/script/core/reference.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local files = require 'files'
local vm = require 'vm'
local findSource = require 'core.find-source'
diff --git a/script/core/rename.lua b/script/core/rename.lua
index 6df3778e..eee9d351 100644
--- a/script/core/rename.lua
+++ b/script/core/rename.lua
@@ -1,6 +1,6 @@
local files = require 'files'
local vm = require 'vm'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local proto = require 'proto'
local define = require 'proto.define'
local util = require 'utility'
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua
index 75870c42..17e3b386 100644
--- a/script/core/semantic-tokens.lua
+++ b/script/core/semantic-tokens.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local await = require 'await'
local define = require 'proto.define'
local vm = require 'vm'
diff --git a/script/core/signature.lua b/script/core/signature.lua
index 21e5759f..1c9cb812 100644
--- a/script/core/signature.lua
+++ b/script/core/signature.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local vm = require 'vm'
local hoverLabel = require 'core.hover.label'
local hoverDesc = require 'core.hover.description'
diff --git a/script/core/type-formatting.lua b/script/core/type-formatting.lua
index 2bff61fc..c2290ef3 100644
--- a/script/core/type-formatting.lua
+++ b/script/core/type-formatting.lua
@@ -1,6 +1,6 @@
local files = require 'files'
local lookBackward = require 'core.look-backward'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local function insertIndentation(uri, offset, edits)
local lines = files.getLines(uri)
diff --git a/script/core/workspace-symbol.lua b/script/core/workspace-symbol.lua
index 86b644d3..c024cf1d 100644
--- a/script/core/workspace-symbol.lua
+++ b/script/core/workspace-symbol.lua
@@ -1,5 +1,5 @@
local files = require 'files'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local matchKey = require 'core.matchkey'
local define = require 'proto.define'
local await = require 'await'
diff --git a/script/files.lua b/script/files.lua
index 3f3d633e..9cc6b549 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -9,7 +9,7 @@ local await = require 'await'
local timer = require 'timer'
local plugin = require 'plugin'
local util = require 'utility'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local smerger = require 'string-merger'
local progress = require "progress"
diff --git a/script/parser/compile.lua b/script/parser/compile.lua
index febb8c2c..392f0682 100644
--- a/script/parser/compile.lua
+++ b/script/parser/compile.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local type = type
local os = os
diff --git a/script/parser/init.lua b/script/parser/init.lua
index ba40d145..790adbb8 100644
--- a/script/parser/init.lua
+++ b/script/parser/init.lua
@@ -5,7 +5,7 @@ local api = {
split = require 'parser.split',
calcline = require 'parser.calcline',
lines = require 'parser.lines',
- guide = require 'parser.guide',
+ guide = require 'core.guide',
luadoc = require 'parser.luadoc',
}
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 9de7f0fc..dad32378 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -1,7 +1,7 @@
local m = require 'lpeglabel'
local re = require 'parser.relabel'
local lines = require 'parser.lines'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local TokenTypes, TokenStarts, TokenFinishs, TokenContents
local Ci, Offset, pushError, Ct, NextComment
diff --git a/script/proto/define.lua b/script/proto/define.lua
index 6ba02dd3..55f477b6 100644
--- a/script/proto/define.lua
+++ b/script/proto/define.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local util = require 'utility'
local m = {}
diff --git a/script/vm/eachDef.lua b/script/vm/eachDef.lua
index 8d031f42..d72c8f01 100644
--- a/script/vm/eachDef.lua
+++ b/script/vm/eachDef.lua
@@ -1,6 +1,6 @@
---@type vm
local vm = require 'vm.vm'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local files = require 'files'
local util = require 'utility'
local await = require 'await'
diff --git a/script/vm/eachField.lua b/script/vm/eachField.lua
index 690f6aa4..59f35f0c 100644
--- a/script/vm/eachField.lua
+++ b/script/vm/eachField.lua
@@ -1,6 +1,6 @@
---@type vm
local vm = require 'vm.vm'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local await = require 'await'
local config = require 'config'
diff --git a/script/vm/eachRef.lua b/script/vm/eachRef.lua
index 1073ecbe..9d0f061c 100644
--- a/script/vm/eachRef.lua
+++ b/script/vm/eachRef.lua
@@ -1,6 +1,6 @@
---@type vm
local vm = require 'vm.vm'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local util = require 'utility'
local await = require 'await'
local config = require 'config'
diff --git a/script/vm/getClass.lua b/script/vm/getClass.lua
index c98a3102..5c68e0bb 100644
--- a/script/vm/getClass.lua
+++ b/script/vm/getClass.lua
@@ -1,6 +1,6 @@
---@type vm
local vm = require 'vm.vm'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local function lookUpDocClass(source)
local infers = vm.getInfers(source, 0)
diff --git a/script/vm/getDocs.lua b/script/vm/getDocs.lua
index 1bf27859..cfa9326f 100644
--- a/script/vm/getDocs.lua
+++ b/script/vm/getDocs.lua
@@ -1,6 +1,6 @@
local files = require 'files'
local util = require 'utility'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
---@type vm
local vm = require 'vm.vm'
local config = require 'config'
diff --git a/script/vm/getGlobals.lua b/script/vm/getGlobals.lua
index 75512a75..2752ce09 100644
--- a/script/vm/getGlobals.lua
+++ b/script/vm/getGlobals.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local await = require "await"
---@type vm
local vm = require 'vm.vm'
diff --git a/script/vm/getInfer.lua b/script/vm/getInfer.lua
index df1a64e1..5447ca23 100644
--- a/script/vm/getInfer.lua
+++ b/script/vm/getInfer.lua
@@ -1,6 +1,6 @@
---@type vm
local vm = require 'vm.vm'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local util = require 'utility'
local await = require 'await'
local config = require 'config'
diff --git a/script/vm/getLinks.lua b/script/vm/getLinks.lua
index 434b6855..91a5f1a0 100644
--- a/script/vm/getLinks.lua
+++ b/script/vm/getLinks.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
---@type vm
local vm = require 'vm.vm'
local files = require 'files'
diff --git a/script/vm/guideInterface.lua b/script/vm/guideInterface.lua
index 473d1bef..ae060481 100644
--- a/script/vm/guideInterface.lua
+++ b/script/vm/guideInterface.lua
@@ -2,7 +2,7 @@
local vm = require 'vm.vm'
local files = require 'files'
local ws = require 'workspace'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local await = require 'await'
local config = require 'config'
diff --git a/script/vm/vm.lua b/script/vm/vm.lua
index b7eb1cde..0248ad8c 100644
--- a/script/vm/vm.lua
+++ b/script/vm/vm.lua
@@ -1,4 +1,4 @@
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
local util = require 'utility'
local files = require 'files'
local timer = require 'timer'
diff --git a/test.lua b/test.lua
index cc11d2b4..5adf111f 100644
--- a/test.lua
+++ b/test.lua
@@ -46,7 +46,7 @@ end
local function main()
debug.setcstacklimit(1000)
- require 'parser.guide'.debugMode = true
+ require 'core.guide'.debugMode = true
require 'language' 'zh-cn'
require 'utility'.enableCloseFunction()
local function test(name)
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 6ab57a06..f45e6a9e 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1,7 +1,7 @@
local files = require 'files'
local config = require 'config'
local vm = require 'vm'
-local guide = require 'parser.guide'
+local guide = require 'core.guide'
rawset(_G, 'TEST', true)