ox

The Ox programming language, compiler and tools (WIP)
Log | Files | Refs | README | LICENSE

commit 7ef8ad7d52a0fcb984f113b4f803fd5d019b7f9c
parent a66ba77a44ea79e58078811d8731b83d18752966
Author: citbl <citbl@citbl.org>
Date:   Mon, 24 Nov 2025 18:38:51 +1000

handle inner blocks (see notes)

Diffstat:
Msrc/gen/gen.c | 2++
Mtests/ex-blocks-inner.ox | 1+
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gen/gen.c b/src/gen/gen.c @@ -1014,6 +1014,8 @@ build_statement(Gen* gen, Node* node) // "closure" build_func_decl(gen, node); return false; + case NODE_BLOCK: + build_block(gen, node); default: printf("build_statement unhandled, %s\n", node_type_str(node->type)); break; diff --git a/tests/ex-blocks-inner.ox b/tests/ex-blocks-inner.ox @@ -7,4 +7,5 @@ void main() { print(y); } print(x); + print("should print 1 2 1"); }