summaryrefslogtreecommitdiff
path: root/script/vm/memoryAPI.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-12 20:44:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-12 20:44:33 +0800
commitd9d65f5720ec8f9052e84f839161a781613592d3 (patch)
tree8b7cf5e2aab4d99190564b9fde51a13484622495 /script/vm/memoryAPI.lua
parentecffa11c6f5f296856428743f5763abde16c4b85 (diff)
downloadlua-language-server-d9d65f5720ec8f9052e84f839161a781613592d3.zip
memoryAPI
Diffstat (limited to 'script/vm/memoryAPI.lua')
-rw-r--r--script/vm/memoryAPI.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/script/vm/memoryAPI.lua b/script/vm/memoryAPI.lua
new file mode 100644
index 00000000..079687d7
--- /dev/null
+++ b/script/vm/memoryAPI.lua
@@ -0,0 +1,34 @@
+---@class vm
+---@field memoryAPI? table
+local vm = require 'vm.vm'
+
+---@class vm.memoryAPI
+---@field root string
+---@field classes vm.memoryAPI.class[]
+
+---@class vm.memoryAPI.class
+---@field namespace string
+---@field baseClass string
+---@field attribute string
+---@field integerface string[]
+---@field fields vm.memoryAPI.field[]
+---@field methods vm.memoryAPI.method[]
+
+---@class vm.memoryAPI.field
+---@field name string
+---@field typeName string
+---@field comment string
+---@field location string
+
+---@class vm.memoryAPI.method
+---@field name string
+---@field comment string
+---@field location string
+---@field isStatic boolean
+---@field returnTypeName string
+---@field params {name: string, typeName: string}[]
+
+---@param api vm.memoryAPI
+function vm.saveMemoryAPI(api)
+ vm.memoryAPI = api
+end