ruby/prism/templates
Kevin Newton 3eb42054d9 [ruby/prism] Pass Unicode escapes on to onigmo
When we encounter an invalid unicode escape within a regular
expression, we now pass that error on to Onigmo as if it didn't
exist in the parser (which matches the upstream parser's behavior).

We do this because there are tests that specify that you are
allowed to have invalid Unicode escapes if they are within the
context of a regular expression comment for a regular expression
in extended mode. That looks like:

    /# \u /x

Note that this _only_ applies to Unicode escapes (as opposed to
applying to hex or meta/control escapes as well). Importantly it
also only applies if the regular expression is terminated. An
unterminated regular expression will still get error handling done
in the parser. That would look like:

    /# \u

that would result in the same error handling we have today.

https://github.com/ruby/prism/commit/fb98034806
2024-08-23 19:18:14 +00:00
..
ext/prism [ruby/prism] Add node ids to nodes 2024-07-11 14:25:54 -04:00
include/prism [ruby/prism] Update templates/include/prism/ast.h.erb 2024-08-22 15:23:33 +00:00
lib/prism [ruby/prism] Fix up spacing in generated node.rb 2024-08-13 12:41:07 +00:00
src [ruby/prism] Pass Unicode escapes on to onigmo 2024-08-23 19:18:14 +00:00
template.rb [ruby/prism] Various cleanup for initializers and typechecks 2024-07-11 14:25:54 -04:00