diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-10-11 10:37:40 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-10-11 10:37:40 +0900 |
commit | a84d0945faa499351e9d11f649e9c132c540eb46 (patch) | |
tree | 44e6fe6a97d9cf456e5372cba135c91483b22593 /parse.y | |
parent | 4d0a619f712bfd189dcedcf9998b143a731a2211 (diff) | |
download | ruby-a84d0945faa499351e9d11f649e9c132c540eb46.tar.gz |
Semicolon after `SWITCH_BY_COND_TYPE` for auto-indent [ci skip]
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -14064,12 +14064,13 @@ enum cond_type { COND_IN_FF }; -#define SWITCH_BY_COND_TYPE(t, w, arg) \ +#define SWITCH_BY_COND_TYPE(t, w, arg) do { \ switch (t) { \ case COND_IN_OP: break; \ case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \ case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \ - } + } \ +} while (0) static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*); @@ -14101,11 +14102,11 @@ cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *l case NODE_DSTR: case NODE_EVSTR: case NODE_STR: - SWITCH_BY_COND_TYPE(type, warn, "string ") + SWITCH_BY_COND_TYPE(type, warn, "string "); break; case NODE_DREGX: - if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ") + if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex "); return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc); @@ -14129,12 +14130,12 @@ cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *l case NODE_DSYM: warn_symbol: - SWITCH_BY_COND_TYPE(type, warning, "symbol ") + SWITCH_BY_COND_TYPE(type, warning, "symbol "); break; case NODE_LIT: if (RB_TYPE_P(RNODE_LIT(node)->nd_lit, T_REGEXP)) { - if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ") + if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex "); nd_set_type(node, NODE_MATCH); } else if (RNODE_LIT(node)->nd_lit == Qtrue || @@ -14145,7 +14146,7 @@ cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *l goto warn_symbol; } else { - SWITCH_BY_COND_TYPE(type, warning, "") + SWITCH_BY_COND_TYPE(type, warning, ""); } default: break; |