general/markup/type.bend
near-v-framework@0.5.0.0 · 12 lines · 0 definitions
1import Base
2
3# Markup: elements with attributes and children, and text. HTML, SVG and XML are all markup; a typed
4# language (like domain/app/html) lowers into it to be printed.
5type Attribute is Data:
6 Attribute{name: String, value: String}
7
8type Node is Data:
9 Element{tag: String, attributes: List<&2, Attribute>, children: List<&2, Node>}
10 Void{tag: String, attributes: List<&2, Attribute>}
11 Text{text: String}
12 Raw{text: String}