oxc/crates/oxc_parser
overlookmotel cc2ddbee77
refactor(parser): catch all illegal UTF-8 bytes (#2415)
Catch all illegal UTF-8 bytes with the `UER` byte handler.

From https://datatracker.ietf.org/doc/html/rfc3629:

> The octet values C0, C1, F5 to FF never appear.

This change *should* make no difference at all, as a valid `&str` may not contain any of these byte values anyway. But it's possible if user has e.g. created the string with `str::from_utf8_unchecked` and not obeyed the safety contraints. This will at least contain the damage if that's happened, and panic rather than lead to UB. And since we're already catching other error conditions, may as well catch them all.
2024-02-16 20:49:01 +08:00
..
examples chore(parser): add visitor example (#2271) 2024-02-02 17:08:00 +08:00
src refactor(parser): catch all illegal UTF-8 bytes (#2415) 2024-02-16 20:49:01 +08:00
Cargo.toml perf(parser): consume multi-line comments faster (#2377) 2024-02-11 12:43:14 +08:00