summaryrefslogtreecommitdiff
path: root/server/src/vm
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-09 22:11:29 +0800
committersumneko <sumneko@hotmail.com>2019-04-09 22:11:29 +0800
commit3de52b4373abf7d73521845729fa9d67c5fb3a2a (patch)
tree6e61561336fa1c7e9926fc1982149be2b6bc9f9f /server/src/vm
parent152493371538908b2dda622a62bea92c46ed20db (diff)
downloadlua-language-server-3de52b4373abf7d73521845729fa9d67c5fb3a2a.zip
LuaJIT 的编译规则
Diffstat (limited to 'server/src/vm')
-rw-r--r--server/src/vm/vm.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua
index 1f9f4e83..aafe7a10 100644
--- a/server/src/vm/vm.lua
+++ b/server/src/vm/vm.lua
@@ -1203,7 +1203,7 @@ local function compile(vm, ast, lsp, uri)
-- 创建初始环境
ast.uri = vm.uri
-- 根据运行版本决定环境实现方式
- if config.config.runtime.version == 'Lua 5.1' then
+ if config.config.runtime.version == 'Lua 5.1' or config.config.runtime.version == 'LuaJIT' then
vm.envType = 'fenv'
else
vm.envType = '_ENV'