mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-08-07 22:17:07 +02:00
tui_00: runs again
This commit is contained in:
parent
ad1a514edd
commit
4cfe8d087c
1 changed files with 8 additions and 0 deletions
|
|
@ -39,6 +39,14 @@ struct State {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Interpret<Tui, Option<XYWH<u16>>> for State {
|
impl Interpret<Tui, Option<XYWH<u16>>> for State {
|
||||||
|
fn interpret_word <'a> (&'a self, to: &mut Tui, lang: &'a impl Symbol) -> Drawn<u16> {
|
||||||
|
match lang.src()? {
|
||||||
|
Some(":hello") => "hello".draw(to),
|
||||||
|
Some(":world") => "world".draw(to),
|
||||||
|
Some(":hello-world") => "Hello World!".draw(to),
|
||||||
|
_ => todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
fn interpret_expr <'a> (&'a self, to: &mut Tui, lang: &'a impl Expression) -> Drawn<u16> {
|
fn interpret_expr <'a> (&'a self, to: &mut Tui, lang: &'a impl Expression) -> Drawn<u16> {
|
||||||
Ok(Some(if let Some(area) = eval_view(self, to, lang)? {
|
Ok(Some(if let Some(area) = eval_view(self, to, lang)? {
|
||||||
area
|
area
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue