We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d891ce commit 9b6b699Copy full SHA for 9b6b699
script/vm/variable-id.lua
@@ -6,6 +6,8 @@ local vm = require 'vm.vm'
6
---@class vm.variable
7
---@field sets parser.object[]
8
---@field gets parser.object[]
9
+---@field node? vm.node
10
+---@field type 'global'|'local'
11
12
---@class parser.object
13
---@field package _variableID string|false
@@ -119,8 +121,9 @@ end
119
121
function vm.insertVariableID(id, source)
120
122
local root = guide.getRoot(source)
123
if not root._variableIDs then
- root._variableIDs = util.multiTable(2, function ()
124
+ root._variableIDs = util.multiTable(2, function (head)
125
return {
126
+ type = head:sub(1, 1) == 'l' and 'local' or 'global',
127
sets = {},
128
gets = {},
129
}
0 commit comments