ruby/prism
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
..
templates [ruby/prism] Pass Unicode escapes on to onigmo 2024-08-23 19:18:14 +00:00
util [ruby/prism] Add explicit check for PRISM_HAS_NO_FILESYSTEM 2024-07-26 17:07:50 +00:00
api_pack.c [ruby/prism] Fix up minimal build setting 2024-03-25 11:54:20 -04:00
config.yml [ruby/prism] Pass Unicode escapes on to onigmo 2024-08-23 19:18:14 +00:00
defines.h [ruby/prism] Add explicit check for PRISM_HAS_NO_FILESYSTEM 2024-07-26 17:07:50 +00:00
encoding.c [ruby/prism] Provide options for reducing size 2024-03-20 17:32:03 -04:00
encoding.h [ruby/prism] Provide options for reducing size 2024-03-20 17:32:03 -04:00
extension.c [ruby/prism] Fix up lex result constants 2024-08-15 16:50:00 +00:00
extension.h [ruby/prism] Make sure Init_prism is visible for extension 2024-06-19 00:06:01 +00:00
node.h [ruby/prism] Remove various unused memsize infra 2024-05-24 17:19:34 +00:00
options.c [ruby/prism] Callback on shebang switches 2024-08-14 17:40:43 +00:00
options.h [ruby/prism] Callback on shebang switches 2024-08-14 17:40:43 +00:00
pack.c [ruby/prism] Provide options for reducing size 2024-03-20 17:32:03 -04:00
pack.h [ruby/prism] Fix up minimal build setting 2024-03-25 11:54:20 -04:00
parser.h [ruby/prism] Implement mismatched indentation warning 2024-07-22 18:57:10 +00:00
prettyprint.h [ruby/prism] Fix up minimal build setting 2024-03-25 11:54:20 -04:00
prism.c [ruby/prism] Pass Unicode escapes on to onigmo 2024-08-23 19:18:14 +00:00
prism.h [ruby/prism] Remove error formatting, put directly in CRuby 2024-05-24 17:19:36 +00:00
regexp.c [ruby/prism] Turn off extended mode when parsing extended group 2024-08-22 14:43:35 +00:00
regexp.h [ruby/prism] Properly support parsing regexp in extended mode 2024-07-01 14:42:10 +00:00
static_literals.c [ruby/prism] Remove Debug::static_inspect 2024-05-24 17:19:33 +00:00
static_literals.h [ruby/prism] Remove Debug::static_inspect 2024-05-24 17:19:33 +00:00
version.h Sync prism version to latest 2024-06-07 15:54:06 -04:00