summaryrefslogtreecommitdiff
path: root/server/src/vm/global.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/global.lua')
-rw-r--r--server/src/vm/global.lua25
1 files changed, 0 insertions, 25 deletions
diff --git a/server/src/vm/global.lua b/server/src/vm/global.lua
deleted file mode 100644
index af30ffdd..00000000
--- a/server/src/vm/global.lua
+++ /dev/null
@@ -1,25 +0,0 @@
-local library = require 'core.library'
-local libraryBuilder = require 'vm.library'
-local sourceMgr = require 'vm.source'
-
-return function (lsp)
- local global = lsp and lsp.globalValue
- if not global then
- libraryBuilder.clear()
- local t = {}
- for name, lib in pairs(library.global) do
- t[name] = libraryBuilder.value(lib)
- end
-
- global = t._G
- global:markGlobal()
- global:set('ENV', true)
- for k, v in pairs(t) do
- global:setChild(k, v, sourceMgr.dummy())
- end
- end
- if lsp then
- lsp.globalValue = global
- end
- return global
-end