You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Trac3r-rust/notes/layout-scripts.txt

96 lines
1.2 KiB

4 years ago
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2020-10-06T22:33:37-07:00
====== layout-scripts ======
Created Tuesday 06 October 2020
===== Keywords =====
***table will need some description of it's requested elements***
**Actually I think this could just be done in the parser. Emitting warnings if names dont match**
elem table {
}
**elem is a keyword specifying that the next token will implement some type of rendering behaviour in this case, it is a table.**
elem table : globalTableFormatting {
meta tableFormatting {
}
}
4 years ago
meta globalTableFormatting {
4 years ago
}
**meta is a keyword specifying that the next token will contain some subset of the data that an elem that needs to render.**
===== Nesting =====
**There is no way around a tree structure in the markup.**
elem div {
4 years ago
}
4 years ago
elem table {
meta tableFormatting {
color: Black,
}
elem tr {
elem tc {
text: "testText1"
}
elem tc {
text: "testText2"
}
}
}
**But I think I can strongly type the nesting structure, e.g**
struct Table {
fn addChild(child: TableRow)
}
elem!(table, Table)
struct TableRow {
fn addChild(child: TableColumn)
}
elem!(table, TableRow)