Commit graph

192 commits

Author SHA1 Message Date
Boshen
70189f9758
refactor(ast): change the arguments order for some new functions 2023-09-16 16:07:52 +08:00
Boshen
38bbc96fb0
Release oxc v0.2.0 2023-09-14 23:41:44 +08:00
Boshen
f447cf3a3b
perf(lexer): only check the first lower case for match_keyword (#913) 2023-09-14 23:19:16 +08:00
Boshen
7962e81a43
perf(lexer): remove an extra branch from identifier_name_handler (#912) 2023-09-14 22:42:38 +08:00
Boshen
babbc47d61
perf(parser): lazily build trivia map instead of build in-place (#903)
closes #898
2023-09-12 23:23:56 +08:00
Boshen
1793397f20
perf(parser): remove an extra branch from parse_member_expression_rhs hot path (#896) 2023-09-11 23:25:19 +08:00
Boshen
7c8e6ab6f6
fix(parser): parse [+In] in object binding initializer (#874)
closes #873
2023-09-09 14:54:20 +08:00
Boshen
a2dbfeeb25
refactor: clean up fuzzer, move it to repo root (#872) 2023-09-09 11:58:32 +08:00
dependabot[bot]
5defa2fa96
chore(deps): bump the dependencies group with 6 updates (#852) 2023-09-04 15:46:27 +08:00
Boshen
93adc9b9c2
Release oxc v0.1.3 2023-09-03 12:22:05 +08:00
Boshen
37bf4c4421
Release oxc v0.1.2 2023-09-03 11:30:44 +08:00
Boshen
d25355c9e8
perf(lexer): reduce an extra branch from peek (#841) 2023-09-03 00:02:42 +08:00
Boshen
53b094e46c
chore: clean up deps (#840) 2023-09-02 21:34:24 +08:00
Boshen
56aaf31fb1
refactor(benchmark): use codspeed for all benchmarks (#839) 2023-09-02 20:35:48 +08:00
EliLichtblau
6a9d57061c
TSTypeName change identifer name to identifier reference (#804)
When initially written types were not in the symbol table. Now that
types are in the symbol table it makes sense given
```ts
type A = 1
type B = A
```
that you can get to the symbol id for for A from type B = A.

Please correct me if I'm wrong about how I implemented this. I also
verified that occurrence (I believe this is the correct word) behaves
how I would expect.

```ts
type RecursiveType = string | {[x: string]: RecursiveType}
```
Does populate a reference.

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2023-08-28 11:42:21 +08:00
Boshen
dd7749f949
improve README (#800)
closes #686

Rendered: https://github.com/web-infra-dev/oxc/blob/readme/README.md

This is a refinement for the README, which should include information
for different interests: first time reader, explorer, rust crate / napi
user etc.
2023-08-27 22:36:17 +08:00
Boshen
1f27426570
Release crates as v0.1.1 2023-08-26 17:53:11 +08:00
Boshen
12798e075f
refactor: improve code coverage a little bit 2023-08-25 23:07:14 +08:00
Boshen
a272c1ffe4
perf(lexer): reduce checks on ident -> keyword (#783) 2023-08-24 18:43:03 +08:00
Boshen
c8a215ea5e
perf(lexer): jump table (#779) 2023-08-24 15:02:06 +08:00
Boshen
5152b39b17
chore: clean up Cargo.toml with cargo machete (#767) 2023-08-20 15:29:09 +08:00
Yunfei He
e7c2313817
feat(ast): add SymbolId and ReferenceId (#755)
Closes #510
2023-08-19 18:09:47 +08:00
Boshen
9fa52fa61c
chore: run just fmt 2023-08-17 14:58:59 +08:00
Boshen
8ae345bde0
chore(parser): add an AST Send example (#712)
relates #709

The allocator and lifetime gets in the way if we want to parse in
parallel but process them in a single thread.

This example uses `ouroboros` to provide a safe API for working with
this unsafe behavior.
2023-08-10 15:56:31 +08:00
Boshen
2f48bdf26f
fix(parser,semantic): make semantic own Trivias (#711)
closes #708

Making the parser return Rc<Trivias> is not a good API, and ideally
`Semantic` should just own `Trivias` so it can process or mutate it.
2023-08-10 15:30:32 +08:00
Yunfei He
35167599bc
refactor(ast): use atom for Directive and Hashbang (#701)
The main reason is using Atom to remove the lifetime for convenience.

And after removing the lifetime of these nodes, the `Program<'a>`
doesn't rely on `&'a source` anymore, which allows us to [specify more
accurate
lifetimes](https://github.com/web-infra-dev/oxc/discussions/700).
2023-08-09 13:52:56 +08:00
EliLichtblau
5e54bd0537
Adding types to the symbol table - consistent export type sample rule implemented (#667)
Fixes 11 TS conformance tests and 18 babel tests.

Adds types to the symbol table functionally conformant to TS behavior
but symbol flags implemented slightly differently.

Symbol redeclaration check is also not entirely conformant but fixing
this seems like a separate PR.

For testing purposes - consistent-export-type was also implemented
(WIP).
2023-07-31 12:33:47 +08:00
Boshen
217997bd7c
chore(rust): run cargo fmt --all -- crates/**/*.rs 2023-07-28 13:57:12 +08:00
Boshen
1012d8300c
chore: release crates as v0.1.0 2023-07-27 13:54:17 +08:00
Boshen
d587065436
chore(rust): update crate info, add minimal rust-version, add categories 2023-07-27 13:33:18 +08:00
Boshen
b34ef4f07a chore: reformat 2023-07-27 13:11:46 +08:00
Boshen
608ee9116b
refactor(parser): remove portable simd because it is not stable Rust (#645)
related #626
2023-07-27 12:43:11 +08:00
Sg
2203d08199
refactor: remove unstable feature slice_as_chunks (#632) 2023-07-26 19:21:35 +08:00
Boshen
2e32140450
publish: bump all crates to v0.0.7 2023-07-06 14:27:13 +08:00
Boshen
8aba8bcbb5
feat(oxc): a single oxc crate (#522) 2023-07-06 13:35:25 +08:00
Boshen
6428139b76
fix(parser): fix re_lex_jsx_identifier not omitting whitespaces
closes #518
2023-07-05 12:53:21 +08:00
Boshen
e25f6e2dd4
chore(rust): rust cargo fmt and fix clippy warnings 2023-07-04 15:41:30 +08:00
Boshen
2be637c6ea
feat(linter): implement no_sparse_arrays 2023-06-28 23:03:40 +08:00
阿良仔
26c3ece37c
feat: handle UnaryOpsWithBigInt (#475) 2023-06-25 22:37:36 +08:00
Boshen
925cee20c1
feat(parser): parse TypeScript this function parameter (#464) 2023-06-20 21:56:28 +08:00
Boshen
19b839efe9
perf(semantic): use IndexVec instead of indextree for ast nodes (#462) 2023-06-20 15:21:58 +08:00
Boshen
166af12b9d
fix(parser): compile in wasm 2023-06-13 17:42:40 +08:00
Carter Snook
c0726e444f
feat(lexer): use linear lexing on WASM (#436)
Co-authored-by: Boshen <boshenc@gmail.com>
2023-06-13 15:18:02 +08:00
Carter Snook
985b8f21d9
feat: support hashbang interpreter comments (#431) 2023-06-11 23:55:58 +08:00
Boshen
1ed8df2d83
feat(parser): parse const type parameter from TypeScript v5.0 (#416) 2023-06-08 22:26:35 +08:00
Carter Snook
23d2a9f6d7
chore(typo): expect -> except (#415) 2023-06-08 14:28:29 +08:00
Wenzhe Wang
1a31c76ee9
refactor(minifier): reduce and clean match checks (#406) 2023-06-06 12:46:13 +08:00
Boshen
f8125af850 feat(minimizer): print parentheses 2023-06-01 22:45:26 +08:00
Wenzhe Wang
4109c8b8a5
feat(parser): distinguish exponential number (#399) 2023-06-01 15:15:22 +08:00
Boshen
c01df484db
refactor(hir,syntax): define Precedence for hir expressions 2023-05-29 14:15:14 +08:00