ForEachStatement ForEach 循环分支
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface ForEachStatement {
"concept": "ForEachStatement", // 产品概念
"each": LogicItem, // 循环列表
"item": Param, // 循环项参数
"index": Param, // 循环项索引
"start": LogicItem, // 循环开始值
"end": LogicItem, // 循环结束值
"body": Array<LogicItem>, // 循环体
}
class ForEachStatementTreeNode {
ConceptEnum concept; // 产品概念
LogicItemTreeNode each; // 循环列表
ParamTreeNode item; // 循环项参数
ParamTreeNode index; // 循环项索引
LogicItemTreeNode start; // 循环开始值
LogicItemTreeNode end; // 循环结束值
List<LogicItemTreeNode> body; // 循环体
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/ForEachStatement",
"definitions": {
"ForEachStatement": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "ForEachStatement"
},
"each": {
"$ref": "#/definitions/LogicItem"
},
"item": {
"$ref": "#/definitions/Param"
},
"index": {
"$ref": "#/definitions/Param"
},
"start": {
"$ref": "#/definitions/LogicItem"
},
"end": {
"$ref": "#/definitions/LogicItem"
},
"body": {
"type": "array",
"items": {
"$ref": "#/definitions/LogicItem"
}
}
},
"required": [
"concept",
"each",
"item",
"index",
"start",
"end",
"body"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "ForEachStatement",
"each": null,
"item": null,
"index": null,
"start": null,
"end": null,
"body": []
}
concept: ForEachStatement
each: null
item: null
index: null
start: null
end: null
body: []