summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua1
-rw-r--r--script/vm/infer.lua4
2 files changed, 5 insertions, 0 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 1c3be7c8..9b871553 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1290,6 +1290,7 @@ local compilerSwitch = util.switch()
: case 'doc.type.integer'
: case 'doc.type.string'
: case 'doc.type.boolean'
+ : case 'doc.type.code'
: call(function (source)
vm.setNode(source, source)
end)
diff --git a/script/vm/infer.lua b/script/vm/infer.lua
index ef8c6f29..9db69b4d 100644
--- a/script/vm/infer.lua
+++ b/script/vm/infer.lua
@@ -135,6 +135,10 @@ local viewNodeSwitch = util.switch()
: call(function (source, infer)
return ('%q'):format(source[1])
end)
+ : case 'doc.type.code'
+ : call(function (source, infer)
+ return ('`%s`'):format(source[1])
+ end)
: case 'doc.type.function'
: call(function (source, infer, uri)
infer._hasDocFunction = true