WhileStatement While 循环分支
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface WhileStatement {
"concept": "WhileStatement", // 产品概念
"test": LogicItem, // 条件表达式
"body": Array<LogicItem>, // 循环体
}
class WhileStatementTreeNode {
ConceptEnum concept; // 产品概念
LogicItemTreeNode test; // 条件表达式
List<LogicItemTreeNode> body; // 循环体
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/WhileStatement",
"definitions": {
"WhileStatement": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "WhileStatement"
},
"test": {
"$ref": "#/definitions/LogicItem"
},
"body": {
"type": "array",
"items": {
"$ref": "#/definitions/LogicItem"
}
}
},
"required": [
"concept",
"test",
"body"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "WhileStatement",
"test": null,
"body": []
}
concept: WhileStatement
test: null
body: []