Skip to content

Commit 9b6b699

Browse files
committed
stash
1 parent 2d891ce commit 9b6b699

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

script/vm/variable-id.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ local vm = require 'vm.vm'
66
---@class vm.variable
77
---@field sets parser.object[]
88
---@field gets parser.object[]
9+
---@field node? vm.node
10+
---@field type 'global'|'local'
911

1012
---@class parser.object
1113
---@field package _variableID string|false
@@ -119,8 +121,9 @@ end
119121
function vm.insertVariableID(id, source)
120122
local root = guide.getRoot(source)
121123
if not root._variableIDs then
122-
root._variableIDs = util.multiTable(2, function ()
124+
root._variableIDs = util.multiTable(2, function (head)
123125
return {
126+
type = head:sub(1, 1) == 'l' and 'local' or 'global',
124127
sets = {},
125128
gets = {},
126129
}

0 commit comments

Comments
 (0)