summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-24 16:10:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-24 16:10:35 +0800
commit574136216e1cbfe5836bc3136fdc66c250e7be07 (patch)
tree7b404ded5fc6b07efff73180490ce0f3d07c8c0f /script/vm
parent3534367f05b37b0122441bf3b3ddaaaf707c9514 (diff)
downloadlua-language-server-574136216e1cbfe5836bc3136fdc66c250e7be07.zip
fix #1229
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 9ed7f271..e62f7843 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -102,6 +102,7 @@ local searchFieldSwitch = util.switch()
end
end)
: case 'string'
+ : case 'doc.type.string'
: call(function (suri, source, key, ref, pushResult)
-- change to `string: stringlib` ?
local stringlib = vm.getGlobal('type', 'stringlib')
@@ -706,7 +707,8 @@ function vm.compileByParentNode(source, key, ref, pushResult)
and node.cate == 'type'
---@cast node vm.global
and not guide.isBasicType(node.name)
- ) then
+ )
+ or node.type == 'doc.type.string' then
searchFieldSwitch(node.type, suri, node, key, ref, function (res, markDoc)
if markDoc then
docedResults[#docedResults+1] = res