diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-07 10:05:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-07 10:05:03 +0800 |
commit | ca299b0289c0f79972d83c44baa29cde20ce31f4 (patch) | |
tree | f7abd21d6b2cf2f2dd5d3d15d648b49f021ca034 /script/vm | |
parent | 38f1e8ef764d4016dcaf788efa07765f7ac961cd (diff) | |
download | lua-language-server-ca299b0289c0f79972d83c44baa29cde20ce31f4.zip |
resolve #1293 operator supports `string`
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/operator.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/script/vm/operator.lua b/script/vm/operator.lua index 69340648..de2c3243 100644 --- a/script/vm/operator.lua +++ b/script/vm/operator.lua @@ -95,6 +95,10 @@ function vm.runOperator(op, exp, value) local node = vm.compileNode(exp) local result for c in node:eachObject() do + if c.type == 'string' + or c.type == 'doc.type.string' then + c = vm.declareGlobal('type', 'string') + end if c.type == 'global' and c.cate == 'type' then ---@cast c vm.global for _, set in ipairs(c:getSets(uri)) do |