diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-26 11:12:10 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-26 11:12:10 +0900 |
| commit | 4803718b14bef490418368d3003b97e09c30d685 (patch) | |
| tree | 63f5e5559fabd84b10015c5768eee195e07d93fa | |
| parent | f6b37ff44d5d9fb4697e8ae1bca56f8d62cc5360 (diff) | |
| download | mruby-4803718b14bef490418368d3003b97e09c30d685.tar.gz mruby-4803718b14bef490418368d3003b97e09c30d685.zip | |
parse.y: unify redundant functions `yywarn()` and `yywarning()`.
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index c59a8e480..c7f044a30 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -33,7 +33,6 @@ typedef struct mrb_parser_heredoc_info parser_heredoc_info; static int yyparse(parser_state *p); static int yylex(void *lval, parser_state *p); static void yyerror(parser_state *p, const char *s); -static void yywarn(parser_state *p, const char *s); static void yywarning(parser_state *p, const char *s); static void backref_error(parser_state *p, node *n); static void void_expr_error(parser_state *p, node *n); @@ -1623,7 +1622,7 @@ bodystmt : compstmt NODE_LINENO($$, $1); } else if ($3) { - yywarn(p, "else without rescue is useless"); + yywarning(p, "else without rescue is useless"); $$ = push($1, $3); } else { @@ -4125,7 +4124,7 @@ yyerror_c(parser_state *p, const char *msg, char c) } static void -yywarn(parser_state *p, const char *s) +yywarning(parser_state *p, const char *s) { char* c; size_t n; @@ -4153,12 +4152,6 @@ yywarn(parser_state *p, const char *s) } static void -yywarning(parser_state *p, const char *s) -{ - yywarn(p, s); -} - -static void yywarning_s(parser_state *p, const char *msg, const char *s) { char buf[256]; |
