From 9b6b699a6943f6f77af19b8af04644ec2d337983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 5 Jan 2023 19:59:38 +0800 Subject: stash --- script/vm/variable-id.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'script/vm') 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 = {}, } -- cgit v1.2.3