diff options
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/ripper/tools/preproc.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ripper/tools/preproc.rb b/ext/ripper/tools/preproc.rb index a98a60e319..a0d5e79d7d 100644 --- a/ext/ripper/tools/preproc.rb +++ b/ext/ripper/tools/preproc.rb @@ -59,9 +59,9 @@ def prelude(f, out) when /\A%%/ out << "%%\n" return - when /\A%token/, /\A%type/, /\A} <node>/ + when /\A%token/, /\A%type/, /\A} <node(?>_\w+)?>/ # types in %union which have corresponding set_yylval_* macro. - out << line.sub(/<(?:node|num|id)>/, '<val>') + out << line.sub(/<(?:node(?>_\w+)?|num|id)>/, '<val>') when /^enum lex_state_(?:bits|e) \{/ lex_state_def = true out << line |
