summaryrefslogtreecommitdiff
path: root/script/vm/compiler.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r--script/vm/compiler.lua11
1 files changed, 4 insertions, 7 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index a36904f8..663d7446 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1303,16 +1303,13 @@ local compilerSwitch = util.switch()
end)
: case 'setglobal'
: call(function (source)
+ if bindDocs(source) then
+ return
+ end
if source.node[1] ~= '_ENV' then
return
end
- local key = guide.getKeyName(source)
- vm.compileByParentNode(source.node, key, function (src)
- if src.type == 'doc.type.field'
- or src.type == 'doc.field' then
- vm.setNode(source, vm.compileNode(src))
- end
- end)
+ vm.setNode(source, vm.compileNode(source.value))
end)
: case 'getglobal'
: call(function (source)