277 lines
6.1 KiB
JSON
277 lines
6.1 KiB
JSON
|
|
{
|
|||
|
|
"functions": [
|
|||
|
|
{
|
|||
|
|
"name": "file",
|
|||
|
|
"description": "",
|
|||
|
|
"params": [],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "void",
|
|||
|
|
"description": ""
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "close",
|
|||
|
|
"description": "关闭文件流",
|
|||
|
|
"params": [],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "void",
|
|||
|
|
"description": ""
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "len",
|
|||
|
|
"description": "获取数据长度",
|
|||
|
|
"params": [
|
|||
|
|
{
|
|||
|
|
"name": "data",
|
|||
|
|
"type": "object",
|
|||
|
|
"description": "基本数据类型"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "int",
|
|||
|
|
"description": ""
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"functionEx": [
|
|||
|
|
{
|
|||
|
|
"name": "sq_RGB",
|
|||
|
|
"description": "颜色空间",
|
|||
|
|
"params": [
|
|||
|
|
{
|
|||
|
|
"name": "R",
|
|||
|
|
"type": "int",
|
|||
|
|
"description": "红色(0-255)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "G",
|
|||
|
|
"type": "int",
|
|||
|
|
"description": "绿色(0-255)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "B",
|
|||
|
|
"type": "int",
|
|||
|
|
"description": "蓝色(0-255)"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "object",
|
|||
|
|
"description": "颜色对象"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "sq_RGBA",
|
|||
|
|
"description": "颜色空间",
|
|||
|
|
"params": [
|
|||
|
|
{
|
|||
|
|
"name": "R",
|
|||
|
|
"type": "int",
|
|||
|
|
"description": "红色(0-255)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "G",
|
|||
|
|
"type": "int",
|
|||
|
|
"description": "绿色(0-255)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "B",
|
|||
|
|
"type": "int",
|
|||
|
|
"description": "蓝色(0-255)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "A",
|
|||
|
|
"type": "int",
|
|||
|
|
"description": "透明度(0-255)"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "object",
|
|||
|
|
"description": "颜色对象"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"classes": [
|
|||
|
|
{
|
|||
|
|
"name": "String",
|
|||
|
|
"description": "字符串类,提供字符串操作方法",
|
|||
|
|
"methods": [
|
|||
|
|
{
|
|||
|
|
"name": "len",
|
|||
|
|
"description": "返回字符串长度",
|
|||
|
|
"params": [],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "integer",
|
|||
|
|
"description": "字符串的长度"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "slice",
|
|||
|
|
"description": "返回字符串的子串",
|
|||
|
|
"params": [
|
|||
|
|
{
|
|||
|
|
"name": "start",
|
|||
|
|
"type": "integer",
|
|||
|
|
"description": "起始位置"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "end",
|
|||
|
|
"type": "integer",
|
|||
|
|
"description": "结束位置(可选)",
|
|||
|
|
"optional": true
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "子串"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "find",
|
|||
|
|
"description": "查找子串在字符串中的位置",
|
|||
|
|
"params": [
|
|||
|
|
{
|
|||
|
|
"name": "substr",
|
|||
|
|
"type": "string",
|
|||
|
|
"description": "要查找的子串"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "integer",
|
|||
|
|
"description": "子串的位置,未找到返回-1"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"properties": [
|
|||
|
|
{
|
|||
|
|
"name": "length",
|
|||
|
|
"type": "integer",
|
|||
|
|
"description": "字符串的长度"
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "Array",
|
|||
|
|
"description": "数组类,提供数组操作方法",
|
|||
|
|
"methods": [
|
|||
|
|
{
|
|||
|
|
"name": "len",
|
|||
|
|
"description": "返回数组长度",
|
|||
|
|
"params": [],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "integer",
|
|||
|
|
"description": "数组的长度"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "append",
|
|||
|
|
"description": "向数组末尾添加元素",
|
|||
|
|
"params": [
|
|||
|
|
{
|
|||
|
|
"name": "value",
|
|||
|
|
"type": "any",
|
|||
|
|
"description": "要添加的元素"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "void",
|
|||
|
|
"description": "无返回值"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "pop",
|
|||
|
|
"description": "移除并返回数组最后一个元素",
|
|||
|
|
"params": [],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "any",
|
|||
|
|
"description": "被移除的元素"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"properties": [
|
|||
|
|
{
|
|||
|
|
"name": "length",
|
|||
|
|
"type": "integer",
|
|||
|
|
"description": "数组的长度"
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "Table",
|
|||
|
|
"description": "表类,提供表操作方法",
|
|||
|
|
"methods": [
|
|||
|
|
{
|
|||
|
|
"name": "len",
|
|||
|
|
"description": "返回表中键值对的数量",
|
|||
|
|
"params": [],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "integer",
|
|||
|
|
"description": "键值对的数量"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "rawget",
|
|||
|
|
"description": "获取指定键的值",
|
|||
|
|
"params": [
|
|||
|
|
{
|
|||
|
|
"name": "key",
|
|||
|
|
"type": "any",
|
|||
|
|
"description": "键"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "any",
|
|||
|
|
"description": "键对应的值"
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "rawset",
|
|||
|
|
"description": "设置指定键的值",
|
|||
|
|
"params": [
|
|||
|
|
{
|
|||
|
|
"name": "key",
|
|||
|
|
"type": "any",
|
|||
|
|
"description": "键"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "value",
|
|||
|
|
"type": "any",
|
|||
|
|
"description": "值"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"returns": {
|
|||
|
|
"type": "void",
|
|||
|
|
"description": "无返回值"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"properties": []
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"constants": [
|
|||
|
|
{
|
|||
|
|
"name": "PI",
|
|||
|
|
"value": "3.14159",
|
|||
|
|
"description": "圆周率",
|
|||
|
|
"category": "math"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "true",
|
|||
|
|
"value": "true",
|
|||
|
|
"description": "布尔真值",
|
|||
|
|
"category": "boolean"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "false",
|
|||
|
|
"value": "false",
|
|||
|
|
"description": "布尔假值",
|
|||
|
|
"category": "boolean"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"name": "null",
|
|||
|
|
"value": "null",
|
|||
|
|
"description": "空值",
|
|||
|
|
"category": "general"
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
}
|