diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-17 04:24:44 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-17 04:24:44 +0800 |
commit | fbb028fa8ac1c1d146e4e6aecda03442af9ddee8 (patch) | |
tree | bd0e28e93525f9f95754800f118d77c8ae8cecc9 /script/vm/value.lua | |
parent | 103d77b9789d0e9d420479dd7b746827ce79e3da (diff) | |
download | lua-language-server-fbb028fa8ac1c1d146e4e6aecda03442af9ddee8.zip |
fix optional
Diffstat (limited to 'script/vm/value.lua')
-rw-r--r-- | script/vm/value.lua | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/script/vm/value.lua b/script/vm/value.lua index a784be2a..1a2b5722 100644 --- a/script/vm/value.lua +++ b/script/vm/value.lua @@ -41,28 +41,9 @@ function vm.test(source) end end ----@param source parser.object ----@return boolean -function vm.isFalsy(source) - if source.type == 'nil' then - return true - end - if source.type == 'boolean' - or source.type == 'doc.type.boolean' then - return source[1] == false - end - return false -end - ---@param v vm.object ---@return string? local function getUnique(v) - if v.type == 'local' then - return ('loc:%s@%d'):format(guide.getUri(v), v.start) - end - if v.type == 'global' then - return ('%s:%s'):format(v.cate, v.name) - end if v.type == 'boolean' then if v[1] == nil then return false |