diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-16 23:52:04 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-16 23:52:04 +0900 |
commit | 0d7e847153ed5b6006b686085207527ff2f28853 (patch) | |
tree | 88a7ce42f7fd3c4341cdd3fb75e31c74262e3516 /parse.y | |
parent | 7d3634a121736eea1a43a332b9abd0540d3a6300 (diff) |
Consider the special node when printing
Appreciation to the reporter, Huichiao Tsai <hctsai.cs10@nycu.edu.tw>.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1466,7 +1466,10 @@ static int looking_at_eol_p(struct parser_params *p); %define parse.error verbose %printer { #ifndef RIPPER - if ($$) { + if ($$ == (NODE *)-1) { + rb_parser_printf(p, "NODE_SPECIAL"); + } + else if ($$) { rb_parser_printf(p, "%s", ruby_node_name(nd_type($$))); } #else |