diff options
author | fesily <fesil@foxmail.com> | 2023-06-01 10:22:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 10:22:23 +0800 |
commit | 0c3e35427e70cf83178e338e854f70e9f8124bf9 (patch) | |
tree | 71256586dbf13086de1266a851d1c567ef04c2f0 /script/vm | |
parent | de98b5c16e0c54bcbbe12840b376273295845fdd (diff) | |
download | lua-language-server-0c3e35427e70cf83178e338e854f70e9f8124bf9.zip |
Update compiler.lua
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/compiler.lua | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 3927e359..6b4636fc 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -523,16 +523,7 @@ local function getReturnOfSetMetaTable(args) end) end --过滤nil - local len = #node - for i = len, 1, -1 do - local n = node[i] - if n.cate == 'type' then - if n.name == 'nil' then - table.remove(node, i) - break - end - end - end + node:remove 'nil' return node end |