summaryrefslogtreecommitdiff
path: root/server/src/vm/emmy.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/emmy.lua')
-rw-r--r--server/src/vm/emmy.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/src/vm/emmy.lua b/server/src/vm/emmy.lua
index cf6d7026..a66738e5 100644
--- a/server/src/vm/emmy.lua
+++ b/server/src/vm/emmy.lua
@@ -29,6 +29,7 @@ function mt:doEmmy(action)
elseif tp == 'emmyArrayType' then
self:doEmmyArrayType(action)
elseif tp == 'emmyTableType' then
+ self:doEmmyTableType(action)
elseif tp == 'emmyFunctionType' then
elseif tp == 'emmySee' then
elseif tp == 'emmyIncomplete' then
@@ -237,6 +238,20 @@ function mt:doEmmyArrayType(action)
return type
end
+function mt:doEmmyTableType(action)
+ ---@type emmyMgr
+ local emmyMgr = self.emmyMgr
+ self:instantSource(action)
+ local keyType = self:buildEmmyType(action[1])
+ local valueType = self:buildEmmyType(action[2])
+ local type = emmyMgr:addTableType(action, keyType, valueType)
+ self._emmy = type
+ if self.lsp then
+ self.lsp.global:markGet(self:getUri())
+ end
+ return type
+end
+
function mt:doEmmyIncomplete(action)
self:instantSource(action)
end