mirror of
https://github.com/marko-js/marko.git
synced 2026-02-01 16:07:13 +00:00
92 lines
2.2 KiB
JSON
92 lines
2.2 KiB
JSON
{
|
|
"type": "TemplateRoot",
|
|
"body": [
|
|
{
|
|
"type": "If",
|
|
"test": {
|
|
"type": "FunctionCall",
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"name": "notEmpty"
|
|
},
|
|
"args": [
|
|
{
|
|
"type": "MemberExpression",
|
|
"object": {
|
|
"type": "Identifier",
|
|
"name": "data"
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"name": "colors"
|
|
},
|
|
"computed": false
|
|
}
|
|
]
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "HtmlElement",
|
|
"tagName": "ul",
|
|
"attributes": [
|
|
{
|
|
"type": "HtmlAttribute",
|
|
"name": "class",
|
|
"value": {
|
|
"type": "Literal",
|
|
"value": "colors"
|
|
}
|
|
}
|
|
],
|
|
"body": [
|
|
{
|
|
"type": "ForEach",
|
|
"varName": {
|
|
"type": "Identifier",
|
|
"name": "color"
|
|
},
|
|
"in": {
|
|
"type": "MemberExpression",
|
|
"object": {
|
|
"type": "Identifier",
|
|
"name": "data"
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"name": "colors"
|
|
},
|
|
"computed": false
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "HtmlElement",
|
|
"tagName": "li",
|
|
"attributes": [
|
|
{
|
|
"type": "HtmlAttribute",
|
|
"name": "class",
|
|
"value": {
|
|
"type": "Literal",
|
|
"value": "color"
|
|
}
|
|
}
|
|
],
|
|
"body": [
|
|
{
|
|
"type": "Text",
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"name": "color"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|