diff options
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/compiler.lua | 15 | ||||
-rw-r--r-- | script/vm/doc.lua | 6 |
2 files changed, 15 insertions, 6 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index f07bcdc6..7e026474 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -7,11 +7,14 @@ local files = require 'files' local vm = require 'vm.vm' ---@class parser.object ----@field _compiledNodes boolean ----@field _node vm.node ----@field cindex integer ----@field func parser.object ----@field hideView boolean +---@field _compiledNodes boolean +---@field _node vm.node +---@field cindex integer +---@field func parser.object +---@field hideView boolean +---@field package _returns? parser.object[] +---@field package _callReturns? parser.object[] +---@field package _asCache? parser.object[] -- 该函数有副作用,会给source绑定node! ---@param source parser.object @@ -483,6 +486,7 @@ function vm.getReturnOfFunction(func, index) func._returns = {} end if not func._returns[index] then + ---@diagnostic disable-next-line: missing-fields func._returns[index] = { type = 'function.return', parent = func, @@ -580,6 +584,7 @@ local function getReturn(func, index, args) end if not func._callReturns[index] then local call = func.parent + ---@diagnostic disable-next-line: missing-fields func._callReturns[index] = { type = 'call.return', parent = call, diff --git a/script/vm/doc.lua b/script/vm/doc.lua index a6ea248f..5cb039fe 100644 --- a/script/vm/doc.lua +++ b/script/vm/doc.lua @@ -5,7 +5,11 @@ local vm = require 'vm.vm' local config = require 'config' ---@class parser.object ----@field package _castTargetHead parser.object | vm.global | false +---@field package _castTargetHead? parser.object | vm.global | false +---@field package _validVersions? table<string, boolean> +---@field package _deprecated? parser.object | false +---@field package _async? boolean +---@field package _nodiscard? boolean ---获取class与alias ---@param suri uri |