diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-12 10:35:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-12 10:35:34 +0800 |
commit | b338c55ba516b2dc6e885ba02f0a0f997cbb437d (patch) | |
tree | f2e871cc07f72f4b957b309e4d1941b5c634378d /server/src/matcher | |
parent | 88db4a03b656931b0f8c42d1ef4a32218e61e04d (diff) | |
download | lua-language-server-b338c55ba516b2dc6e885ba02f0a0f997cbb437d.zip |
让_G等于_ENV
Diffstat (limited to 'server/src/matcher')
-rw-r--r-- | server/src/matcher/vm.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua index fbf9ac4b..3264bd18 100644 --- a/server/src/matcher/vm.lua +++ b/server/src/matcher/vm.lua @@ -800,6 +800,10 @@ function mt:createEnvironment() end end end + + -- 设置 _G 等于 _ENV + local g = self:getField(pValue, '_G') + self:setValue(g, pValue) end local function compile(ast) |