mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
21037456df
Add variable-sized node structures for all control flow statements: - IF/ELSIF/ELSE statements with optimized condition handling - WHILE and UNTIL loops with proper jump generation - FOR loops with iterator support - CASE/WHEN statements with multiple condition matching Key changes: - Added variable-sized node structures (mrb_ast_if_node, mrb_ast_while_node, mrb_ast_until_node, mrb_ast_case_node, mrb_ast_for_node) to node.h - Implemented parser functions with size class allocation in parse.y - Added comprehensive codegen support with proper jump handling and stack management in codegen.c - All control flow nodes now use NODE_VARIABLE wrapper for consistency - Variable-sized nodes enabled by default for improved memory efficiency This provides memory-efficient storage for control flow constructs while maintaining full compatibility with existing functionality. Co-authored-by: Claude <noreply@anthropic.com>