Commit graph

205 commits

Author SHA1 Message Date
dependabot[bot]
8caf77300b
chore(deps): bump the dependencies group with 10 updates (#831) 2023-09-01 13:56:12 +08:00
Boshen
75af639d4a
chore(rust): remove unicode support from regex for smaller binary size (#823) 2023-09-01 12:42:58 +08:00
Boshen
00ed939cbc
feat(coverage): init git submodules if they are empty (#808)
closes #805
2023-08-29 13:35:32 +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
Yunfei He
e7c2313817
feat(ast): add SymbolId and ReferenceId (#755)
Closes #510
2023-08-19 18:09:47 +08:00
阿良仔
5a73f0e1b5
feat(formatter): add EndOfLine (#747) 2023-08-17 19:04:23 +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
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
Matthew "strager" Glazar
ad00720d75 refactor: avoid unstable let_chains
The let_chains Rust feature is unstable, preventing Oxc from using a
stable Rust compiler. Refactor the code to avoid let_chains.
2023-07-27 09:44:57 +08:00
Boshen
2330099a34
deps(rust): bump dependencies 2023-07-21 11:38:12 +08:00
Boshen
38e11956be
chore(rust): rust version 1.71.0 nightly 2023-07-13 23:10:10 +08:00
Boshen
c5402c1cae
feat(linter): implement no-import-assign (nursery) 2023-07-01 11:20:31 +08:00
Boshen
06764f8574
chore(tasks): add swc-7187 test case 2023-06-30 16:41:52 +08:00
Boshen
925cee20c1
feat(parser): parse TypeScript this function parameter (#464) 2023-06-20 21:56:28 +08:00
Boshen
d30735677b
refactor(semantic): merge semantic2 crate into semantic crate (#460) 2023-06-19 20:20:59 +08:00
Boshen
bad8bfcf16
ci: run conformance tests and bail if there are outdated snapshots (#444) 2023-06-14 21:44:10 +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
Boshen
243e48ac09
fix(coverage): make ignoring "literals/regexp" work on Windows 2023-06-13 14:31:59 +08:00
Boshen
1ed8df2d83
feat(parser): parse const type parameter from TypeScript v5.0 (#416) 2023-06-08 22:26:35 +08:00
Wenzhe Wang
ddc129262d
feat(minifer): minify number (#405) 2023-06-03 21:24:39 +08:00
Boshen
f8125af850 feat(minimizer): print parentheses 2023-06-01 22:45:26 +08:00
Boshen
895d26ebf9
chore(coverage): update snapshot 2023-06-01 14:28:00 +08:00
Boshen
6ef839b781
chore(rust): bump deps 2023-05-31 16:34:28 +08:00
Boshen
a7f8b66618
chore: bump submodules 2023-05-25 22:48:10 +08:00
Boshen
b6d9104a52
chore(coverage): remove catch_unwind
There's a stack overflow in one of the files, I think this is one of the cause?
2023-05-25 21:22:00 +08:00
Boshen
c613583544
chore(coverage): bump coverage status 2023-05-25 18:46:48 +08:00
Boshen
4414f3e071
chore(just): add command for updating submodules 2023-05-25 18:40:35 +08:00
Boshen
a8641b9921
chore(parser): move inline tests to snapshot testing 2023-05-21 12:05:25 +08:00
Boshen
ad2835f11b
chore(rustfmt): run cargo fmt 2023-05-21 11:52:26 +08:00
Boshen
fc7a374e7c
feat(coverage): add a directory for tests
closes #363
2023-05-20 23:02:30 +08:00
Wenzhe Wang
9678832f2b
fix: add parens for unary expression (#362) 2023-05-17 10:13:48 +08:00
Boshen
a0b09a3f27
refactor(ast): remove RestElement from BindingPattern 2023-05-16 22:25:52 +08:00
Wenzhe Wang
bd56bb7abe
fix(minifier): break directive prologue (#360) 2023-05-16 21:35:58 +08:00
Boshen
af95b59a0e
feat(ast): split Property into ObjectProperty and BindingProperty (#361) 2023-05-16 15:51:50 +08:00
Boshen
5be0d1b9fa
fix(hir): bring back ParenthesizedExpression as it caused too much chaos 2023-05-14 22:54:57 +08:00
Boshen
dc768ba8ad
feat(minifier): turn on mangle by default 2023-05-14 18:33:29 +08:00
Wenzhe Wang
e6737fdc48
fix(minifier): continue compress left expr (#356) 2023-05-14 13:03:34 +08:00
Boshen
d14329e74e
feat(semantic2): bind identifiers 2023-05-13 22:58:42 +08:00
Boshen
6db5f4e59b
fix(minifier): print SequenceExpression and ObjectExpression with parens 2023-05-13 21:57:02 +08:00
Boshen
1f5fa8d6cb
feat: reimplement semantic builder (#354) 2023-05-13 15:20:00 +08:00
Wenzhe Wang
7b834d4bd9
fix(minifier): not merge different kinds of declarations. (#353) 2023-05-13 10:51:10 +08:00
Boshen
14720e7c69
refactor: move SourceType from oxc_ast to oxc_span (#351)
related #350
2023-05-12 23:16:14 +08:00
Boshen
7f93e58f10
chore: remove all #[must_use] 2023-05-11 21:08:00 +08:00
Boshen
7496bb521f
fix(minifier): print if.consequent correctly (#349) 2023-05-11 11:00:49 +08:00
Boshen
48e524ddcf
feat(ast_lower): scope tree (#344) 2023-05-10 22:38:34 +08:00
Boshen
6924e59c5c
chore: remove unused dependencies found by cargo-machete 2023-05-10 19:22:22 +08:00
Boshen
0a445b4556
chore(coverage): run typescript tests for formatter 2023-05-09 23:19:35 +08:00
Boshen
8161ac2800
refactor: clean up Cargo.toml (put features table on top) 2023-05-09 21:53:47 +08:00
Boshen
e753a886d2
fix(minifier): add parentheses to CallExpression on FunctionExpression 2023-05-08 23:04:35 +08:00
Wenzhe Wang
52aa59bb38
feat(semantic): early check of simple assignment (#340) 2023-05-07 23:05:08 +08:00