Skip to main content
Version: 3.9

EnumItem 枚举值

1. 结构声明

class EnumItem extends BaseNode {
value: string;
label: StaticString;
}

2. 节点示例

(1) 带描述的示例

AST 如下:

{
"concept": "EnumItem",
"value": "Listing",
"label": {
"concept": "StaticString",
"value": "上架"
}
}

对应的代码如下:

@(label = '上架')
case Listing