looking-at-specs
parent
c0b1c2e135
commit
d1373fc061
@ -0,0 +1,90 @@
|
||||
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 {
|
||||
}
|
||||
}
|
||||
|
||||
meta globalTableFormatting : {
|
||||
}
|
||||
|
||||
**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 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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in new issue