summaryrefslogtreecommitdiff
path: root/script/files.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-11 14:52:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-11 14:52:40 +0800
commit50e6cd02d535e12e085eab7d8bdcb4757be857f2 (patch)
tree5811e18bf8ce45ce243c388f296aebd60523e2ba /script/files.lua
parent997f15620b6e4dfe6a21ed52b17ac15c4e6b9a93 (diff)
downloadlua-language-server-50e6cd02d535e12e085eab7d8bdcb4757be857f2.zip
rename getAst -> getState
Diffstat (limited to 'script/files.lua')
-rw-r--r--script/files.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/script/files.lua b/script/files.lua
index bb143250..3ee64229 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -378,7 +378,7 @@ function m.eachDll()
return pairs(map)
end
-function m.compileAst(uri, text)
+function m.compileState(uri, text)
local ws = require 'workspace'
if not m.isOpen(uri) and #text >= config.config.workspace.preloadFileSize * 1000 then
if not m.notifyCache['preloadFileSize'] then
@@ -446,8 +446,8 @@ end
--- 获取文件语法树
---@param uri uri
----@return table ast
-function m.getAst(uri)
+---@return table state
+function m.getState(uri)
uri = getUriKey(uri)
if uri ~= '' and not m.isLua(uri) then
return nil
@@ -458,7 +458,7 @@ function m.getAst(uri)
end
local ast = m.astMap[uri]
if not ast then
- ast = m.compileAst(uri, file.text)
+ ast = m.compileState(uri, file.text)
m.astMap[uri] = ast
--await.delay()
end