summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-27 14:29:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-27 14:29:18 +0800
commit33403e6e582cfc0069e1b51bedec58f1ac603dae (patch)
treee2de677ff45400a78a94a64df4c0c5caaa8dc768
parent24f2bab098c176acdd58a5dc82ec037b2ded8eeb (diff)
downloadlua-language-server-33403e6e582cfc0069e1b51bedec58f1ac603dae.zip
update
-rw-r--r--script/library.lua4
-rw-r--r--script/vm/compiler.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/script/library.lua b/script/library.lua
index 57e77988..a2a1bb87 100644
--- a/script/library.lua
+++ b/script/library.lua
@@ -214,7 +214,7 @@ local function initBuiltIn(uri)
version = version,
language = langID,
encoding = encoding,
- })
+ })--[[@as fspath]]
local metaLang = loadMetaLocale('en-US')
if langID ~= 'en-US' then
@@ -245,7 +245,7 @@ local function initBuiltIn(uri)
end
libName = libName .. '.lua'
---@type fspath
- local libPath = templateDir / libName
+ local libPath = templateDir / libName--[[@as fspath]]
local metaDoc = compileSingleMetaDoc(uri, fsu.loadFile(libPath), metaLang, status)
if metaDoc then
metaDoc = encoder.encode(encoding, metaDoc, 'auto')
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index ff1d9259..ad3295f7 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1398,7 +1398,7 @@ local compilerSwitch = util.switch()
if guide.isGet(source) and bindAs(source) then
return
end
- ---@type string|vm.node
+ ---@type (string|vm.node)?
local key = guide.getKeyName(source)
if key == nil and source.index then
key = vm.compileNode(source.index)