diff --git a/editor/src/lib.rs b/editor/src/lib.rs index 882bdb7116..fd154fa768 100644 --- a/editor/src/lib.rs +++ b/editor/src/lib.rs @@ -303,11 +303,7 @@ fn run_event_loop(file_path_opt: Option<&Path>) -> Result<(), Box> { let region = Region::new(0, 0, 0, 0); let (expr2, _) = crate::lang::expr::str_to_expr2( - &arena, - "\"hello\"", - &mut env, - &mut scope, - region, + &arena, "True", &mut env, &mut scope, region, ) .unwrap(); diff --git a/editor/src/render.rs b/editor/src/render.rs index 4515d6215a..8310b3fa40 100644 --- a/editor/src/render.rs +++ b/editor/src/render.rs @@ -33,6 +33,30 @@ pub fn render_expr2<'a>( queue_code_text_draw(&code_text, glyph_brush); } + Expr2::I128 { text, .. } => { + let code_text = Text { + position, + area_bounds, + color: CODE_COLOR.into(), + text: env.pool.get_str(text), + size: CODE_FONT_SIZE, + ..Default::default() + }; + + queue_code_text_draw(&code_text, glyph_brush); + } + Expr2::U128 { text, .. } => { + let code_text = Text { + position, + area_bounds, + color: CODE_COLOR.into(), + text: env.pool.get_str(text), + size: CODE_FONT_SIZE, + ..Default::default() + }; + + queue_code_text_draw(&code_text, glyph_brush); + } Expr2::Float { text, .. } => { let code_text = Text { position, @@ -57,6 +81,18 @@ pub fn render_expr2<'a>( queue_code_text_draw(&code_text, glyph_brush); } + Expr2::GlobalTag { name, .. } => { + let code_text = Text { + position, + area_bounds, + color: CODE_COLOR.into(), + text: env.pool.get_str(name), + size: CODE_FONT_SIZE, + ..Default::default() + }; + + queue_code_text_draw(&code_text, glyph_brush); + } rest => todo!("implement {:?} render", rest), }; }