Consider the special node when printing
Appreciation to the reporter, Huichiao Tsai <hctsai.cs10@nycu.edu.tw>.
This commit is contained in:
parent
7d3634a121
commit
0d7e847153
5
parse.y
5
parse.y
@ -1466,7 +1466,10 @@ static int looking_at_eol_p(struct parser_params *p);
|
|||||||
%define parse.error verbose
|
%define parse.error verbose
|
||||||
%printer {
|
%printer {
|
||||||
#ifndef RIPPER
|
#ifndef RIPPER
|
||||||
if ($$) {
|
if ($$ == (NODE *)-1) {
|
||||||
|
rb_parser_printf(p, "NODE_SPECIAL");
|
||||||
|
}
|
||||||
|
else if ($$) {
|
||||||
rb_parser_printf(p, "%s", ruby_node_name(nd_type($$)));
|
rb_parser_printf(p, "%s", ruby_node_name(nd_type($$)));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user