Commit graph

9 commits

Author SHA1 Message Date
Kevin Newton
2fa051f627 [ruby/prism] Validate multibyte characters in strings
Check that multibyte characters are valid using pm_strpbrk. We need
to add a couple of codepaths to ensure all encodings are covered.

Importantly this doesn't check regular expressions, because
apparently you're allowed to have invalid multibyte characters
inside regular expression comment groups/extended mode.

2857d3e1b5
2024-02-14 01:01:37 +00:00
Benoit Daloze
9fdfdf4fca [ruby/prism] Always return the character width for char_is_identifier_start() and char_is_identifier_utf8()
* This is also faster than calling pm_encoding_utf_8_alpha_char/pm_encoding_utf_8_alnum_char
  as those compute the character width and do extra checks.

4cb276ac4c
2024-01-31 21:29:16 +00:00
Kevin Newton
82072254a0 [ruby/prism] Update documentation for encodings
18e6df0d4f
2023-12-06 19:26:35 +00:00
Kevin Newton
82f18baa21 [ruby/prism] Provide flags for changing encodings
e838eaff6f
2023-12-06 14:23:38 -05:00
Kevin Newton
99a147ff4f [ruby/prism] Document remaining encodings
b9510aed40
2023-11-30 21:37:56 -05:00
Kevin Newton
0c277f2b76 [ruby/prism] Group encodings into a single array
f4b7beadc9
2023-11-30 21:37:56 -05:00
Kevin Newton
6b234c1acf [ruby/prism] Do not expose encodings that do not need to be exposed
c52c7f37ea
2023-11-30 21:37:56 -05:00
Kevin Newton
997083188b [ruby/prism] Remove public ASCII functions that can now be static
9461384b0c
2023-11-30 21:37:56 -05:00
Kevin Newton
abb1fe2868 [PRISM] Consolidate prism encoding files 2023-11-30 21:37:56 -05:00
Renamed from prism/enc/pm_encoding.h (Browse further)