Boshen
fdf288c685
refactor: improve code coverage in various places ( #721 )
2023-08-11 15:17:49 +08:00
Boshen
89b49bdb07
doc(ast): document why Directive.directive is a raw string
2023-08-09 14:06:25 +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
Don Isaac
47541339a9
feat(ast): AstKind::debug_name() ( #665 )
...
Adds `AstKind::debug_name()`, which returns the name of an AstKind
struct with a few minor details as applicable. I intentionally did not
make `AstKind` implement `Display`, as this method returns minimal
information. Additionally, this method only exists in debug builds. I've
hidden it behind a `#[cfg(debug_assertions)]`, so it won't affect
release builds.
This code was extracted from #642 , where it as created while debugging
iteration over ancestor nodes. I figured it belonged in its own PR and
may be useful to other devs.
2023-07-31 10:04:52 +08:00
Don Isaac
6628fc8d9c
perf(linter): reduce mallocs ( #654 )
...
Reduces mallocs via `clones()` (particularly of `Atom`s), and vec
allocations.
Affects the following rules:
- [x] eslint/no-dupe-keys
- [x] eslint/no-global-assign
- [x] eslint/no-loss-of-precision _(only partially optimized, needs more
work later)_
~- [ ] typescript-eslint/ajacent-overload-signatures~ (_will be
addressed in following pr_)
2023-07-29 12:02:53 +08:00
Boshen
b34ef4f07a
chore: reformat
2023-07-27 13:11:46 +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
38e11956be
chore(rust): rust version 1.71.0 nightly
2023-07-13 23:10:10 +08:00
阿良仔
976059d418
feat: implement GetSpan for ForStatementLeft ( #540 )
2023-07-11 22:11:07 +08:00
Don Isaac
0346adb1eb
feat(linter): add eslint/no-control-regex ( #516 )
2023-07-10 10:20:57 +08:00
u9g
6614b46f26
Visit jsx_element in ast visitor and add to astkind ( #524 )
2023-07-07 12:36:52 +08:00
Boshen
8aba8bcbb5
feat(oxc): a single oxc crate ( #522 )
2023-07-06 13:35:25 +08:00
u9g
974dfa027f
Implement GetSpan for JSXExpression
2023-07-06 00:27:57 -04:00
u9g
ed9f67d263
Add examples to JSXElementName ( #515 )
2023-07-05 00:13:53 +08:00
u9g
4d71784b94
Implement GetSpan for JSXAttributeItem ( #514 )
2023-07-05 00:13:36 +08:00
Boshen
e25f6e2dd4
chore(rust): rust cargo fmt and fix clippy warnings
2023-07-04 15:41:30 +08:00
Boshen
17a73b1eef
refactor(ast): move ModuleRecord to oxc_syntax
2023-07-03 22:54:27 +08:00
Boshen
1aa112917a
feat(linter): implement no-inner-declarations
2023-07-01 13:58:50 +08:00
Boshen
072abcc2a6
fix(linter): fix no_empty_pattern broken on rest elements
2023-06-28 18:40:45 +08:00
u9g
a2d90d94d6
Add comments to BindingPatternKind ( #489 )
2023-06-28 14:47:22 +08:00
u9g
ea3bab96c0
Implement GetSpan for AssignmentTargetPattern ( #488 )
2023-06-28 10:46:25 +08:00
u9g
780e17707b
Implement GetSpan for JSXChild ( #487 )
2023-06-28 00:26:47 +08:00
u9g
4d1863a954
Implement GetSpan for ImportDeclarationSpecifier ( #483 )
2023-06-27 17:33:08 +08:00
u9g
defba1567e
add comments to ImportDeclarationSpecifier ( #484 )
2023-06-27 12:19:43 +08:00
u9g
f12166c92f
Add examples of ModuleDeclaration ( #482 )
2023-06-27 04:42:36 +08:00
阿良仔
26c3ece37c
feat: handle UnaryOpsWithBigInt ( #475 )
2023-06-25 22:37:36 +08:00
u9g
218683fa95
Document TemplateElementValue better ( #473 )
...
Co-authored-by: Boshen <boshenc@gmail.com>
2023-06-24 22:08:53 +08:00
Boshen
66d1c7b1de
feat(linter): implement number_arg_out_of_range from deepscan
2023-06-21 13:58:26 +08:00
Boshen
1bb957bcf8
feat(linter): implement bad_min_max_func from deepscan
2023-06-21 13:58:26 +08:00
Boshen
925cee20c1
feat(parser): parse TypeScript this function parameter ( #464 )
2023-06-20 21:56:28 +08:00
Boshen
993c171547
chore(ast): document ArrowExpression.expression
2023-06-20 21:54:13 +08:00
Boshen
19b839efe9
perf(semantic): use IndexVec instead of indextree for ast nodes ( #462 )
2023-06-20 15:21:58 +08:00
Carter Snook
985b8f21d9
feat: support hashbang interpreter comments ( #431 )
2023-06-11 23:55:58 +08:00
Carter Snook
9df1545602
feat(linter): improve eslint(no-eval) compat ( #419 )
2023-06-10 11:39:54 +08:00
Boshen
1ed8df2d83
feat(parser): parse const type parameter from TypeScript v5.0 ( #416 )
2023-06-08 22:26:35 +08:00
Boshen
86efc07188
fix(ast): properly serialize FormalParameter ( #411 )
2023-06-07 12:26:58 +08:00
Boshen
87a0b6c889
refactor(ast): s/ArrowFunctionExpression/ArrowExpression
2023-05-28 22:40:16 +08:00
Boshen
8ea9e38ee5
feat(minifier): remove redundant curly braces from block statements ( #390 )
2023-05-27 10:52:15 +08:00
Boshen
c4a67b6cfb
feat(minifier): fold return undefined to return ( #387 )
2023-05-25 22:37:55 +08:00
Boshen
a31c7ac77a
refactor(index): use static_assertions
2023-05-24 22:53:11 +08:00
Boshen
6811d67eb3
refactor(ast): move NumberBase to oxc_syntax; add NumberBase::Float
2023-05-24 18:33:19 +08:00
Boshen
ad33954f52
refactor(ast): remove redundant prefix field from UnaryExpression
2023-05-22 22:32:47 +08:00
Boshen
009fc5f285
feat(minifier): minify Infinity
2023-05-21 22:01:47 +08:00
Boshen
5eeb2b0684
refactor(ast): remove ordered_float::NotNan<f64> from NumberLiteral
...
This is not easy to use
2023-05-21 21:46:45 +08:00
Boshen
ad2835f11b
chore(rustfmt): run cargo fmt
2023-05-21 11:52:26 +08:00
Boshen
a0b09a3f27
refactor(ast): remove RestElement from BindingPattern
2023-05-16 22:25:52 +08:00
Boshen
e52ee63cbb
refactor(ast): clean up BindingProperty
2023-05-16 22:24:34 +08:00
Boshen
af95b59a0e
feat(ast): split Property into ObjectProperty and BindingProperty ( #361 )
2023-05-16 15:51:50 +08:00
Boshen
2812591e4a
chore(rust): allow clippy::new_without_default
2023-05-13 15:07:00 +08:00