summaryrefslogtreecommitdiff
path: root/server/src/matcher/vm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/matcher/vm.lua')
-rw-r--r--server/src/matcher/vm.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua
index 48e63670..d8cf97ff 100644
--- a/server/src/matcher/vm.lua
+++ b/server/src/matcher/vm.lua
@@ -1075,6 +1075,7 @@ end
function mt:createEnvironment()
-- 整个文件是一个函数
self.chunk.func = self:buildFunction()
+ self.results.main = self.chunk.func
-- 隐藏的上值`_ENV`
local parent = self:createLocal('_ENV')
local envValue = self:setValue(parent, self:buildTable())
@@ -1110,6 +1111,7 @@ local function compile(ast)
funcs = {},
calls = {},
sources= {},
+ main = nil,
},
libraryValue = {},
libraryChild = {},