Commit graph

16 commits

Author SHA1 Message Date
Boshen
d4ff0bb40e refactor(oxc_parser): parser and lexer does not need to share the errors vec 2023-04-01 15:59:42 +08:00
Boshen
174330561c
fix(parser): fix panic on multi-byte characaters (#233)
* fix(oxc_parser): fix panic when EOF on a multi-byte character

relates #232

* fix(parser): fix panic on multi-byte char in private identifer

relates #232
2023-04-01 13:34:18 +08:00
Boshen
2fe8fba5b6
refactor(lexer): make TokenValue 8 bytes smaller by changing RegExp.pattern to &'a str (#175) 2023-03-13 23:20:52 +08:00
Boshen
f36e3301fd
refactor(lexer): change TokenValue::String(Atom) to TokenValue::String(&str) (#174) 2023-03-13 09:33:44 +08:00
Boshen
605684f4c0
fix: fix clippy warnings 2023-03-12 21:53:08 +08:00
Boshen
66207e74a4
refactor(lexer): remove LexerContext::JsxChild (#172) 2023-03-12 20:19:51 +08:00
Boshen
4d32bfb55e
refactor: remove all declarations of const fn, which is useless for us 2023-03-07 21:29:47 +08:00
Ye Yangchen
0bf8f817f5 feat(oxc_parser): Port isStartOfDeclaration form tsc 2023-02-27 12:27:44 +08:00
Boshen
4f4a9802b7 refactor(diagnostics,parser): move diagnostics to parser 2023-02-22 19:23:01 +08:00
Boshen
5390d3e6b4 refactor(diagnostic): change Err type to miette::Error
This is the prerequisite for breaking up the large Diagnostic enum.
2023-02-22 11:08:21 +08:00
Boshen
4c6407b152 refactor(ast): s/node/span
This corrects the jargon for span. The term `node` came from `estree`,
which is a bit misleading here in Rust.

closes #9
2023-02-21 19:17:49 +08:00
Boshen
a733856536 refactor(ast,parser): use u32 for node spans
The next PR will fix the jargon where Node = Span.

relates to #9
2023-02-21 16:02:23 +08:00
Boshen
d57ab2f088 refactor(ast,parser): remove Node::ctx
This is adding too many bytes to the AST
2023-02-21 13:11:58 +08:00
Boshen
0bbbc7768f perf(oxc_parser): use u8 for offset 2023-02-21 13:11:58 +08:00
Boshen
85955d7147
refactor(parser): clean up some lexer code 2023-02-12 21:34:19 +08:00
Boshen
1fdc635638 feat(parser): add parser 2023-02-11 05:26:49 -08:00