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.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/src/vm/emmy.lua b/server/src/vm/emmy.lua
index 1cd52a8a..a2a38553 100644
--- a/server/src/vm/emmy.lua
+++ b/server/src/vm/emmy.lua
@@ -11,6 +11,7 @@ function mt:doEmmy(action)
elseif tp == 'emmyType' then
self:doEmmyType(action)
elseif tp == 'emmyAlias' then
+ self:doEmmyAlias(action)
elseif tp == 'emmyParam' then
elseif tp == 'emmyReturn' then
elseif tp == 'emmyField' then
@@ -65,6 +66,21 @@ function mt:doEmmyType(action)
if self.lsp then
self.lsp.global:markGet(self:getUri())
end
+ return type
+end
+
+function mt:doEmmyAlias(action)
+ ---@type emmyMgr
+ local emmyMgr = self.emmyMgr
+ self:instantSource(action)
+ self:instantSource(action[1])
+ local type = self:doEmmyType(action[2])
+ local alias = emmyMgr:addAlias(action, type)
+ action:set('emmy.alias', alias)
+ action[1]:set('target class', alias:getName())
+ if self.lsp then
+ self.lsp.global:markSet(self:getUri())
+ end
end
function mt:doEmmyIncomplete(action)