[−][src]Module fungui_syntax::desc
Parser for the UI description format
This module contains the AST and parser for the format used to describe the layout of a UI element.
The format is as follows:
// Comments (only single line)
// Name of an element. Can be made up from any
// letter, number or _
root {
// Nested elements supported
panel {
}
// Properties can be specified within ()
// as `key=value` pairs
image(src="example.png", width=150, height=150) {
}
// {} is optional
emoji(type="smile")
// As is ()
spacer
// Text can be used as well (quoted)
"Hello world"
}
Structs
Document | A UI description document |
Element | An element which can contain other elements and/or have properties attached. |
ValueType | Contains a value and debugging information for the value. |
Enums
Node | A node that can be contained within an element. |
Value | A parsed value for a property |