diff --git a/examples/tui_00.rs b/examples/tui_00.rs index 3c5f3d9..eae8dd9 100644 --- a/examples/tui_00.rs +++ b/examples/tui_00.rs @@ -39,6 +39,14 @@ struct State { } impl Interpret>> for State { + fn interpret_word <'a> (&'a self, to: &mut Tui, lang: &'a impl Symbol) -> Drawn { + 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 { Ok(Some(if let Some(area) = eval_view(self, to, lang)? { area