StaticString 静态字符串
1. 结构声明
- TS Declaration
- JSON Schema
class StaticString extends BaseNode {
value: string;
i18nKey?: uuid;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"value": {
"type": "string"
},
"i18nKey": {
"$ref": "#/definitions/uuid"
}
},
"required": [
"value"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "StaticString",
"value": "这是一段文本",
"i18nKey": "21daa460e9976a46d1b948c13f211550"
}
concept: StaticString
value: 这是一段文本
i18nKey: 21daa460e9976a46d1b948c13f211550
对应的代码如下:
- 文本化 NASL
@(i18nKey = "21daa460e9976a46d1b948c13f211550")
'这是一段文本'