diff options
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/variable-id.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/script/vm/variable-id.lua b/script/vm/variable-id.lua index e5257776..ce4f5f97 100644 --- a/script/vm/variable-id.lua +++ b/script/vm/variable-id.lua @@ -6,6 +6,8 @@ local vm = require 'vm.vm' ---@class vm.variable ---@field sets parser.object[] ---@field gets parser.object[] +---@field node? vm.node +---@field type 'global'|'local' ---@class parser.object ---@field package _variableID string|false @@ -119,8 +121,9 @@ end function vm.insertVariableID(id, source) local root = guide.getRoot(source) if not root._variableIDs then - root._variableIDs = util.multiTable(2, function () + root._variableIDs = util.multiTable(2, function (head) return { + type = head:sub(1, 1) == 'l' and 'local' or 'global', sets = {}, gets = {}, } |