oxc/crates/oxc_parser/src
overlookmotel 5279e8955f
refactor(parser): byte handler for illegal bytes (#2229)
This adds a separate byte handler to the lexer for byte values which
should never be encountered:

1. UTF-8 continuation bytes (i.e. middle of a multi-byte UTF-8 byte
sequence).
2. Bytes values which are illegal in valid UTF-8 strings.

At present, this function is impossible to reach, because
`std::str::Chars` ensures the next byte is always the *start* of a valid
UTF-8 byte sequence. But later changes I intend introducing unsafe code
will make it possible (but highly undesirable!). In the meantime, I
don't think it does any harm to handle this case.
2024-01-31 18:57:47 +08:00
..
js fix(ast): AcessorProperty is missing decorators (#2176) 2024-01-26 15:43:05 +08:00
jsx refactor(parser): reduce Token size from 32 to 16 bytes (#1962) 2024-01-09 15:17:02 +08:00
lexer refactor(parser): byte handler for illegal bytes (#2229) 2024-01-31 18:57:47 +08:00
ts fix(parser): fix crash on TSTemplateLiteralType in function return position (#2089) 2024-01-19 23:14:05 +08:00
context.rs fix(parser): false postive for "Missing initializer in const declaration" in declare + namespace (#1724) 2023-12-18 17:03:42 +08:00
cursor.rs refactor(parser): only allocate for escaped template strings (#2005) 2024-01-12 18:56:36 +08:00
diagnostics.rs refactor(ast): rename RestElement to BindingRestElement (#2116) 2024-01-22 14:28:35 +08:00
lib.rs refactor(parser): move source length check into lexer (#2206) 2024-01-29 22:29:02 +08:00
list.rs fix(parser): fix crashing on empty ParenthesizedExpression with comments (#263) 2023-04-06 17:16:15 +08:00
state.rs refactor(ast): change Option<Vec> to Vec for decorators (#84) 2023-03-02 15:52:46 +08:00