summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-09-07 13:51:18 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-09-07 13:56:41 +0900
commita7a2be7a31b66b05a118fb41dabf0cb965f4a9c0 (patch)
treeb078863b2abfb4c03a63b250d63e70febf3ba867 /parse.y
parent99c9431ea1cc538489c3da70f52121aa8bc0800b (diff)
Rename some function/definition names that handles NODE_LIST
from array to list. Follow up to ac50ac03aeb210763730cdc45f230e236519223d
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y14
1 files changed, 7 insertions, 7 deletions
diff --git a/parse.y b/parse.y
index 82fbf5f910..5408e1afac 100644
--- a/parse.y
+++ b/parse.y
@@ -460,7 +460,7 @@ static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc
static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *);
-#define make_array(ary, loc) ((ary) ? (nd_set_loc(ary, loc), ary) : NEW_ZLIST(loc))
+#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
@@ -2606,7 +2606,7 @@ primary : literal
| tLBRACK aref_args ']'
{
/*%%%*/
- $$ = make_array($2, &@$);
+ $$ = make_list($2, &@$);
/*% %*/
/*% ripper: array!(escape_Qundef($2)) %*/
}
@@ -4293,7 +4293,7 @@ regexp : tREGEXP_BEG regexp_contents tREGEXP_END
words : tWORDS_BEG ' ' word_list tSTRING_END
{
/*%%%*/
- $$ = make_array($3, &@$);
+ $$ = make_list($3, &@$);
/*% %*/
/*% ripper: array!($3) %*/
}
@@ -4329,7 +4329,7 @@ word : string_content
symbols : tSYMBOLS_BEG ' ' symbol_list tSTRING_END
{
/*%%%*/
- $$ = make_array($3, &@$);
+ $$ = make_list($3, &@$);
/*% %*/
/*% ripper: array!($3) %*/
}
@@ -4354,7 +4354,7 @@ symbol_list : /* none */
qwords : tQWORDS_BEG ' ' qword_list tSTRING_END
{
/*%%%*/
- $$ = make_array($3, &@$);
+ $$ = make_list($3, &@$);
/*% %*/
/*% ripper: array!($3) %*/
}
@@ -4363,7 +4363,7 @@ qwords : tQWORDS_BEG ' ' qword_list tSTRING_END
qsymbols : tQSYMBOLS_BEG ' ' qsym_list tSTRING_END
{
/*%%%*/
- $$ = make_array($3, &@$);
+ $$ = make_list($3, &@$);
/*% %*/
/*% ripper: array!($3) %*/
}
@@ -11451,7 +11451,7 @@ new_ary_op_assign(struct parser_params *p, NODE *ary,
{
NODE *asgn;
- args = make_array(args, args_loc);
+ args = make_list(args, args_loc);
if (nd_type(args) == NODE_BLOCK_PASS) {
args = NEW_ARGSCAT(args, rhs, loc);
}