diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 21:04:54 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 21:04:54 +0800 |
commit | 5f564a8ba866ab83f12da38b2f3c56002ce6bace (patch) | |
tree | e2c31161bf1f37fc92d5c93f98ead90e0d255f11 /script/vm/compiler.lua | |
parent | c65de666e0a3706b921993648910ef531c47c607 (diff) | |
download | lua-language-server-5f564a8ba866ab83f12da38b2f3c56002ce6bace.zip |
update
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r-- | script/vm/compiler.lua | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 51999266..165dc6fb 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -1368,24 +1368,20 @@ local compilerSwitch = util.switch() hasMarkDoc = bindDocs(source) end - if source.value then - if not hasMarkDoc or guide.isLiteral(source.value) then - if source.value.type == 'table' then - vm.setNode(source, source.value) - else - vm.setNode(source, vm.compileNode(source.value)) - end - end - end - if not hasMarkDoc then vm.compileByParentNode(source.node, guide.getKeyName(source), false, function (src) if src.type == 'doc.field' or src.type == 'doc.type.field' then + hasMarkDoc = true vm.setNode(source, vm.compileNode(src)) end end) end + + if not hasMarkDoc and source.value then + vm.setNode(source, vm.compileNode(source.value)) + end + end) : case 'field' : case 'method' |