mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler: place newline before else
The mruby C style places `else` on its own line. Reformat the remaining `} else if (...)` occurrence in the C action block of NODE_SYMBOLS dump. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -8690,7 +8690,8 @@ dump_node(mrb_state *mrb, node *tree, int offset)
|
||||
node *item = list->car;
|
||||
if (item->car == 0 && item->cdr == 0) {
|
||||
/* Skip separator (0 . 0) */
|
||||
} else if (item->car && item->cdr) {
|
||||
}
|
||||
else if (item->car && item->cdr) {
|
||||
/* String item: (len . str) */
|
||||
dump_prefix(offset+1, lineno);
|
||||
int len = node_to_int(item->car);
|
||||
|
||||
@@ -15879,7 +15879,8 @@ dump_node(mrb_state *mrb, node *tree, int offset)
|
||||
node *item = list->car;
|
||||
if (item->car == 0 && item->cdr == 0) {
|
||||
/* Skip separator (0 . 0) */
|
||||
} else if (item->car && item->cdr) {
|
||||
}
|
||||
else if (item->car && item->cdr) {
|
||||
/* String item: (len . str) */
|
||||
dump_prefix(offset+1, lineno);
|
||||
int len = node_to_int(item->car);
|
||||
|
||||
Reference in New Issue
Block a user