* parse.y (assign_error_gen): [ripper] rename without backref.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-08-12 03:29:49 +00:00
Родитель 6a7e766fff
Коммит 777f15a3b2
1 изменённых файлов: 6 добавлений и 6 удалений

12
parse.y
Просмотреть файл

@ -564,8 +564,9 @@ static VALUE const_decl_gen(struct parser_params *parser, VALUE path);
#define const_decl(path) const_decl_gen(parser, path) #define const_decl(path) const_decl_gen(parser, path)
#define var_field(n) dispatch1(var_field, (n)) #define var_field(n) dispatch1(var_field, (n))
static VALUE backref_assign_error_gen(struct parser_params *parser, VALUE a); static VALUE assign_error_gen(struct parser_params *parser, VALUE a);
#define backref_assign_error(n, a) backref_assign_error_gen(parser, (a)) #define assign_error(a) assign_error_gen(parser, (a))
#define backref_assign_error(n, a) assign_error(a)
static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *); static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *);
@ -9211,7 +9212,7 @@ assignable_gen(struct parser_params *parser, ID id, NODE *val)
#ifdef RIPPER #ifdef RIPPER
ID id = get_id(lhs); ID id = get_id(lhs);
# define assignable_result(x) get_value(lhs) # define assignable_result(x) get_value(lhs)
# define parser_yyerror(parser, x) (dispatch1(assign_error, lhs), ripper_error()) # define parser_yyerror(parser, x) assign_error_gen(parser, lhs)
#else #else
# define assignable_result(x) (x) # define assignable_result(x) (x)
#endif #endif
@ -10249,14 +10250,13 @@ static VALUE
const_decl_gen(struct parser_params *parser, VALUE path) const_decl_gen(struct parser_params *parser, VALUE path)
{ {
if (in_def || in_single) { if (in_def || in_single) {
dispatch1(assign_error, path); assign_error(path);
ripper_error();
} }
return path; return path;
} }
static VALUE static VALUE
backref_assign_error_gen(struct parser_params *parser, VALUE a) assign_error_gen(struct parser_params *parser, VALUE a)
{ {
a = dispatch1(assign_error, a); a = dispatch1(assign_error, a);
ripper_error(); ripper_error();