Commit graph

230 commits

Author SHA1 Message Date
overlookmotel
19577709db
Remove redundant code from lexer (#1850)
Just removes a couple of lines of redundant code from the lexer.

A note on the 2nd one:

```rs
let mut builder = AutoCow::new(lexer);
let c = lexer.consume_char();
builder.push_matching(c);
```

`push_matching()` is a no-op unless
`force_allocation_without_current_ascii_char()` has already been called.
Here the `AutoCow` has just been freshly created, so we know it hasn't.
2023-12-29 10:07:21 +08:00
overlookmotel
1feec95a94
fix(parser) fix typo in expecting_directives variable name (#1801)
Renamves `expecting_diretives ` to `expecting_directives` to fix spelling
2023-12-24 16:51:02 +00:00
magic-akari
5b2696b711
refactor(parser): report this parameter error (#1788)
- follow up: #1728
2023-12-23 22:09:14 +08:00
Boshen
2b4d1bf142
fix(parser): await in jsx expression
closes #1740
2023-12-19 20:23:16 +08:00
magic-akari
a2858ed452
refactor(ast): introduce ThisParameter (#1728)
Most TypeScript types can be eliminated during the code generation phase
by not printing the corresponding AST nodes.
The changes in this PR enable applying a similar technique to the `this`
parameter.
2023-12-19 13:20:33 +08:00
Boshen
19e77b0af3
fix(parser): false postive for "Missing initializer in const declaration" in declare + namespace (#1724)
closes #1723
2023-12-18 17:03:42 +08:00
Boshen
8edcab82f2
chore(lexer): document the accessor keyword 2023-12-14 12:55:55 +08:00
dependabot[bot]
a3b52fb548
chore(deps): bump the dependencies group with 7 updates (#1651) 2023-12-11 14:21:56 +08:00
Boshen
69c056be79
chore: remove crates/oxc_parser/README.md 2023-12-11 13:59:03 +08:00
Boshen
8347e2225c
Release crates v0.4.0 2023-12-08 17:20:37 +08:00
Boshen
1554f7c0d2
feat(parsr): parse let.a = 1 with error recovery (#1587) 2023-11-29 23:21:39 +08:00
Boshen
9842be4461
refactor(parser): remove duplicated code 2023-11-29 18:23:32 +08:00
Boshen
6670d94708
chore(rust): remove unnecessary clippy::non_upper_case_globals (#1557) 2023-11-27 14:31:38 +08:00
magic-akari
9ff0ffcc6f
feat(ast): implement new proposal-import-attributes (#1476)
- [Import Attributes](https://tc39.es/proposal-import-attributes)
2023-11-25 15:56:09 +08:00
Boshen
567c6ed757
feat(prettier): print directives (#1497) 2023-11-22 19:39:25 +08:00
JonaAnders
08164b0e18
refactor(parser) Updated comments mentioning the ecma specification section 12.x (#1496)
The ECMA specification seems to added the "Tokens" section to the
specification as 12.6. This pushed all the other sections down,
resulting in e.g. former 12.6 now being 12.7. Comments in the parser
mention this part of the specification. All the mentions of section
12.6+ therefor are outdated now. This pull request tries to fix that by
updating all the comments.
2023-11-22 19:29:04 +08:00
Boshen
07b010912a
feat(parser): add preserve_parens option (default: true) (#1474)
closes #1461
2023-11-21 11:16:30 +08:00
magic-akari
a7e0706dbc
fix(parser): correct import_kind of TSImportEqualsDeclaration (#1449) 2023-11-20 16:57:38 +08:00
Boshen
1a576f60a8
refactor(rust): move to workspace lint table (#1444) 2023-11-20 14:38:10 +08:00
Boshen
0218ae8641
feat(prettier): print leading comments with newlines (#1434) 2023-11-19 22:46:55 +08:00
Jon Surrell
cb804d3cd2
Add base to AST BigintLiteral (#1416) 2023-11-19 11:11:19 +08:00
magic-akari
445352991f
fix(parser): Fix type import (#1291)
- fix: #1288 
- fix: #1289
2023-11-14 15:17:58 +08:00
magic-akari
9c0aafcd1c
fix(parser): Disallow ReservedWord in NamedExports (#1230)
- fix: #1222

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2023-11-12 10:52:02 +00:00
magic-akari
8afb81aa34
fix(parser): ASI of async class member (#1214)
Co-authored-by: Boshen <boshenc@gmail.com>
2023-11-10 16:21:51 +00:00
Boshen
ba603cebb9
Release Oxc v0.3.0 2023-11-06 19:11:16 +08:00
Boshen
a455c81db6
fix(linter): revert changes to JSX attribute strings (#1101) 2023-10-30 15:26:04 +08:00
Boshen
6295f9ce18
fix(ast): jsx attribute value and text child should be jsx string (#1089) 2023-10-29 15:32:24 +08:00
Boshen
af1a76bafa
feat(transformer): implement some of needs_explicit_esm for typescript (#1047)
Co-authored-by: magic-akari <akari.ccino@gmail.com>
2023-10-24 17:30:01 +08:00
Boshen
854b55a3e6
feat(codegen): json strings proposal (#1039) 2023-10-23 18:29:30 +08:00
Cameron
76ac9cd4c5
fix(lexer) Fix spans for jsx children (#1030)
Closes #1026
2023-10-22 22:44:19 +08:00
Boshen
4886d408eb
chore(clippy): enable undocumented_unsafe_blocks 2023-10-16 15:18:14 +08:00
Boshen
db5417f9a9
refactor(clippy): allow clippy::too_many_lines 2023-10-16 15:18:11 +08:00
Boshen
47872200e5
refactor(ast): clean up some methods 2023-10-15 10:49:35 +08:00
Boshen
55b2f031df
feat(minifier): partially re-enable minifier (#963)
closes #949
closes #950
closes #951

All minifier tests are disable from this PR.

We are going to fix the compilation errors first, then the behavioral
errors.
2023-10-08 11:06:42 +08:00
Boshen
817f8c295e
ci: turn off doc tests because they are slow to compile and run (#961) 2023-10-07 17:01:23 +08:00
Boshen
5045853b9a
Rust 1.73.0 (#958) 2023-10-06 17:56:14 +13:00
Cameron
5b1e1e5408
feat(parser): TypeScript 5.2 (#811)
- adds support for [Using
Declarations](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#using-declarations-and-explicit-resource-management)

Closes #786
2023-10-05 12:52:14 +13:00
IWANABETHATGUY
266253c142
fix: ts parsing error (#940)
Fixed https://github.com/web-infra-dev/oxc/issues/932
2023-09-29 22:02:56 +13:00
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