mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler: remove unused mrb_ast_when_node structure
removed struct mrb_ast_when_node and when_node() casting macro which were never actually used. NODE_CASE uses cons lists to represent when clauses, not dedicated when_node structures. the structure definition and macro were dead code left over from earlier design. case/when implementation uses: cons(cons(conditions, body), next_when) where each when clause is a cons cell in a list, not a typed node. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -644,13 +644,6 @@ struct mrb_ast_iter_node {
|
||||
struct mrb_ast_node *body;
|
||||
};
|
||||
|
||||
struct mrb_ast_when_node {
|
||||
struct mrb_ast_var_header header;
|
||||
struct mrb_ast_node *cond;
|
||||
struct mrb_ast_node *body;
|
||||
struct mrb_ast_node *next_when;
|
||||
};
|
||||
|
||||
// Group 16: Declarations and Definitions
|
||||
|
||||
struct mrb_ast_alias_node {
|
||||
@@ -681,7 +674,6 @@ struct mrb_ast_postexe_node {
|
||||
#define ensure_node(n) ((struct mrb_ast_ensure_node*)(n))
|
||||
#define stmts_node(n) ((struct mrb_ast_stmts_node*)(n))
|
||||
#define iter_node(n) ((struct mrb_ast_iter_node*)(n))
|
||||
#define when_node(n) ((struct mrb_ast_when_node*)(n))
|
||||
#define alias_node(n) ((struct mrb_ast_alias_node*)(n))
|
||||
#define undef_node(n) ((struct mrb_ast_undef_node*)(n))
|
||||
#define postexe_node(n) ((struct mrb_ast_postexe_node*)(n))
|
||||
|
||||
Reference in New Issue
Block a user