|
7 | 7 | #include "editor_random.h" |
8 | 8 | #include "editor_libs.h" |
9 | 9 | #include "editor_gl.h" |
10 | | -#include "editor_app.h" |
11 | 10 |
|
12 | 11 | #include "editor_lexer.h" |
13 | 12 | #include "editor_lexer.c" |
14 | 13 |
|
15 | 14 | #include "editor_parser.h" |
16 | 15 | #include "editor_parser.c" |
17 | 16 |
|
| 17 | +#include "editor_app.h" |
| 18 | + |
18 | 19 | #define U32ToV3Arg(Hex) \ |
19 | 20 | ((f32)((Hex >> 8 * 2) & 0xFF) / 255.0f), \ |
20 | 21 | ((f32)((Hex >> 8 * 1) & 0xFF) / 255.0f), \ |
@@ -329,8 +330,7 @@ UPDATE_AND_RENDER(UpdateAndRender) |
329 | 330 | else if(Key.Codepoint == PlatformKey_F2) |
330 | 331 | { |
331 | 332 | token_list *List = Lex(App, PermanentArena); |
332 | | - concrete_syntax_tree *Tree = Parse(PermanentArena, List); |
333 | | - visualize_tree(Tree, PermanentArena, Buffer, Input); |
| 333 | + App->tree = Parse(PermanentArena, List); |
334 | 334 | } |
335 | 335 | } |
336 | 336 | } |
@@ -390,6 +390,13 @@ UPDATE_AND_RENDER(UpdateAndRender) |
390 | 390 | GlobalRectsCount = 0; |
391 | 391 | GlobalRectQuadData = (rect_instance *)(RectsBufferData + ArrayCount(QuadPosData)); |
392 | 392 |
|
| 393 | + |
| 394 | + // in the draw rectangles block, after the window border: |
| 395 | + if(App->tree) |
| 396 | + { |
| 397 | + visualize_tree(App->tree, PermanentArena, Buffer, Input); |
| 398 | + } |
| 399 | + |
393 | 400 | //- Render text (rasterized on CPU) |
394 | 401 | app_offscreen_buffer TextImage; |
395 | 402 | { |
|
0 commit comments