diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-01-05 19:59:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-01-05 20:00:16 +0800 |
commit | 9b6b699a6943f6f77af19b8af04644ec2d337983 (patch) | |
tree | 6b1d0b617cb8fb3b00d93fbbd6d460f09d96be30 | |
parent | 2d891ce551b2fe4eaf43a5b9ba68e79df2ee68fa (diff) | |
download | lua-language-server-9b6b699a6943f6f77af19b8af04644ec2d337983.zip |
stash
-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 = {}, } |