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
Makoto Tateno
c5ff534b08
feat(semantic): add node_id to Reference ( #689 )
...
Closes #685
Intend to use this in the following ways in #672 .
```rs
let node = ctx.nodes().get_node(reference.node_id());
if !self.type_of && has_typeof_operator(node, ctx) {
return;
}
```
2023-08-05 12:45:22 +08:00
阿良仔
e090b560be
feat(minifier): initialize conditions folding ( #658 )
...
related: #401
2023-07-30 01:02:32 +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
fa82f940f0
chore: stable Rust
...
closes #626
2023-07-27 13:11:46 +08:00
Boshen
b34ef4f07a
chore: reformat
2023-07-27 13:11:46 +08:00
Boshen
f2df32d1c0
fix(taplo): adjust the include glob so it doesn't time out searching for files
2023-07-27 12:30:34 +08:00
Matthew "strager" Glazar
318d55806f
refactor: format code
...
Removing uses of let_chains now allows rustfmt to format some files.
Run 'cargo fmt' to reformat these files.
2023-07-27 09:44:57 +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
Sg
fbb8aa3338
refactor: remove unstable feature const_trait_impl & const_slice_index & slice_group_by ( #629 )
2023-07-26 17:37:09 +08:00
Don Isaac
87e65ac0f7
refactor(semantic): symbol declarations and references ( #594 )
2023-07-24 10:55:56 +08:00
阿良仔
3c76cef11c
feat(minifier): fold NaN comparison ( #580 )
2023-07-21 11:00:21 +08:00
阿良仔
3cbec3459a
test: add tests for boolean related comparison ( #563 )
2023-07-17 20:55:42 +08:00
Don Isaac
2591194dba
feat(minifier): drop console statements and exprs ( #552 )
2023-07-16 14:41:51 +08:00
阿良仔
c09678a48f
test: add tests for null comparison ( #548 )
2023-07-14 23:25:25 +08:00
Boshen
38e11956be
chore(rust): rust version 1.71.0 nightly
2023-07-13 23:10:10 +08:00
阿良仔
db3ef449fc
test(minifier): add tests for bigint string comparison ( #541 )
2023-07-13 11:44:03 +08:00
阿良仔
f0495ef924
feat(minifier): fold string number comparison ( #538 )
2023-07-11 21:50:51 +08:00
阿良仔
2d984f0401
feat(minifier): fold bigint number comparison ( #536 )
2023-07-10 23:11:28 +08:00
Don Isaac
fd899be4a9
feat(minifier): compress undefined variable declarations ( #532 )
2023-07-10 10:33:42 +08:00
Boshen
2e32140450
publish: bump all crates to v0.0.7
2023-07-06 14:27:13 +08:00
Boshen
19c68c8c57
chore(Cargo): change how crates are version and published
...
Let's publish everything under `oxc` instead of individual crates
2023-07-06 14:14:29 +08:00
Boshen
bc0b69e5e7
chore(rust): fix clippy
2023-07-04 16:09:51 +08:00
Wenzhe Wang
9e24dbb0fa
chore(minifier): remove unused param ( #494 )
2023-06-28 20:21:26 +08:00
Wenzhe Wang
a32320646d
feat(minfier): try fold and or operator ( #472 )
2023-06-28 14:58:55 +08:00
阿良仔
1182985bb0
feat(minifier): implement try_fold_shift ( #478 )
...
* feat: implement `try_fold_shift`
* update minsize
2023-06-27 04:44:23 +08:00
Wenzhe Wang
cb94937ba6
feat(minifier): fold string string comparison ( #471 )
2023-06-26 22:37:50 +08:00
阿良仔
26c3ece37c
feat: handle UnaryOpsWithBigInt ( #475 )
2023-06-25 22:37:36 +08:00
Wenzhe Wang
b8f5e3ad92
feat(minifier): try reduce void ( #457 )
2023-06-23 00:10:46 +08:00
Wenzhe Wang
a5ccc7da30
feat(minifier): port undefined_comparison1 ( #458 )
2023-06-20 22:25:28 +08:00
Boshen
527b94fba6
refactor(hir): use Cell for SymbolId instead of RefCell
2023-06-19 20:23:46 +08:00
Boshen
d30735677b
refactor(semantic): merge semantic2 crate into semantic crate ( #460 )
2023-06-19 20:20:59 +08:00
Boshen
c4008d8014
perf(manger): use RefCell<SymbolId> instead of roundtrip with BTreeMap ( #455 )
2023-06-16 21:15:30 +08:00
Wenzhe Wang
5d10f96051
feat(minifier): try fold unary expression ( #430 )
2023-06-16 00:08:14 +08:00
u9g
db624da84d
Reimplement more of the closure var rename step ( #447 )
...
Co-authored-by: Boshen <boshenc@gmail.com>
closes #442
2023-06-15 23:37:04 +08:00
Boshen
a79480b078
feat(minifier): separate mangler pass ( #439 )
2023-06-14 10:46:13 +08:00
Carter Snook
985b8f21d9
feat: support hashbang interpreter comments ( #431 )
2023-06-11 23:55:58 +08:00
Boshen
5c91fd54e3
feat(minifier): print [-In] Context ( #428 )
2023-06-11 16:44:48 +08:00
Wenzhe Wang
7c79fbc026
feat(minifier): try fold typeof ( #408 )
2023-06-07 10:44:28 +08:00
Wenzhe Wang
1a31c76ee9
refactor(minifier): reduce and clean match checks ( #406 )
2023-06-06 12:46:13 +08:00
Boshen
2bebbb5a77
feat(website): add linter / minifier / formatter to the playground ( #407 )
2023-06-04 15:30:55 +08:00
Wenzhe Wang
ddc129262d
feat(minifer): minify number ( #405 )
2023-06-03 21:24:39 +08:00
Boshen
180eac5523
refactor(rust): fix clippy errors
2023-06-02 10:09:32 +08:00
Boshen
f8125af850
feat(minimizer): print parentheses
2023-06-01 22:45:26 +08:00
Yagiz Nizipli
63c0491ec2
refactor: remove paranthesis expression from printer
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
Wenzhe Wang
3792b70dbd
feat(minifier): may add space before RegExpLiteral ( #397 )
2023-05-29 23:11:40 +08:00
Boshen
c01df484db
refactor(hir,syntax): define Precedence for hir expressions
2023-05-29 14:15:14 +08:00
Boshen
87a0b6c889
refactor(ast): s/ArrowFunctionExpression/ArrowExpression
2023-05-28 22:40:16 +08:00