Already better than CSS because I can center stuff.

This commit is contained in:
Zed A. Shaw 2025-02-15 12:13:58 -05:00
parent 1620a5420f
commit 60ed686eb0
6 changed files with 58 additions and 42 deletions

View file

@ -19,16 +19,18 @@ namespace lel {
action setwidth { setwidth(std::stoi(tk)); }
action setheight { setheight(std::stoi(tk)); }
action expand { expand(); }
action center { center(); }
col = "|" $col;
ltab = "[" $ltab;
rtab = "]" $row;
valign = ("^" | ".") $valign;
expand = "*" $expand;
center = "=" $center;
halign = ("<" | ">") $align;
number = digit+ >{ start = fpc; } %token;
setw = ("(" number %setwidth ("," number %setheight)? ")") ;
modifiers = (expand | valign | halign | setw);
modifiers = (center | expand | valign | halign | setw);
id = modifiers* ((alpha | '_')+ :>> (alnum | '_')*) >{start = fpc;} %id;
row = space* ltab space* id space* (col space* id space*)* space* rtab space*;