diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-25 14:59:37 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-25 14:59:37 +0800 |
commit | 8f9d4b2d402584f7b2439a4e211fb5ca45fd7125 (patch) | |
tree | 70ac28b0fe94de04c625e90c47696d139c5e17e4 /script/vm | |
parent | ae42fbc3b3470b03aa2e86934883acf807a037c4 (diff) | |
download | lua-language-server-8f9d4b2d402584f7b2439a4e211fb5ca45fd7125.zip |
delete `isGlobalLibraryName`
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/library.lua | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/script/vm/library.lua b/script/vm/library.lua index 49f7adb0..e7bf4f42 100644 --- a/script/vm/library.lua +++ b/script/vm/library.lua @@ -13,24 +13,3 @@ function vm.getLibraryName(source) end return nil end - -local globalLibraryNames = { - 'arg', 'assert', 'error', 'collectgarbage', 'dofile', '_G', 'getfenv', - 'getmetatable', 'ipairs', 'load', 'loadfile', 'loadstring', - 'module', 'next', 'pairs', 'pcall', 'print', 'rawequal', - 'rawget', 'rawlen', 'rawset', 'select', 'setfenv', - 'setmetatable', 'tonumber', 'tostring', 'type', '_VERSION', - 'warn', 'xpcall', 'require', 'unpack', 'bit32', 'coroutine', - 'debug', 'io', 'math', 'os', 'package', 'string', 'table', - 'utf8', 'newproxy', -} -local globalLibraryNamesMap -function vm.isGlobalLibraryName(name) - if not globalLibraryNamesMap then - globalLibraryNamesMap = {} - for _, v in ipairs(globalLibraryNames) do - globalLibraryNamesMap[v] = true - end - end - return globalLibraryNamesMap[name] or false -end |