Skip to main content
Version: 3.9

NewList 列表构造器

1. 结构声明

class NewList extends LogicItem {
items: Array<LogicItem>;
}

2. 节点示例

(1) 示例

AST 如下:

{
"concept": "NewList",
"items": [
{
"concept": "StringLiteral",
"value": "选项1"
},
{
"concept": "StringLiteral",
"value": "选项2"
},
{
"concept": "StringLiteral",
"value": "选项3"
}
]
}

对应的代码如下:

['选项1', '选项2', '选项3']