Dunqing
ef82c78a72
fix(parser): trailing comma is not allowed in ParenthesizedExpression ( #3885 )
...
close : #3878
The implementation is copied from `SeparatedList`'s `print_list`.
```diff
fn parse_list(&mut self, p: &mut ParserImpl<'a>) -> Result<()> {
p.expect(self.open())?;
let mut first = true;
while !p.at(self.close()) && !p.at(Kind::Eof) {
if first {
first = false;
} else {
p.expect(self.separator())?;
- if p.at(self.close()) {
- break;
- }
}
self.parse_element(p)?;
}
p.expect(self.close())?;
Ok(())
}
```
2024-06-24 14:56:32 +00:00
Boshen
13754cbd3d
fix(parser): change diagnostic to "modifier cannot be used here" ( #3853 )
2024-06-23 15:14:27 +00:00
Boshen
ae09a97a09
refactor(ast)!: remove Modifiers from ts nodes ( #3846 )
2024-06-23 19:44:35 +08:00
Don Isaac
d5f6aeb1ca
feat(semantic): check for illegal symbol modifiers ( #3838 )
2024-06-23 12:36:09 +08:00
Boshen
c041e9d1a9
chore: bump test262, babel and TypeScript submodules ( #3644 )
2024-06-12 18:42:32 +08:00
Dunqing
350cd9158a
fix(parser): should parser error when function declaration has no name ( #3461 )
...
https://oxc-project.github.io/oxc/playground/?code=3YCAAICNgICAgICAgICzncl%2FKeF7k4Y7upgY2l43c79%2FYxaAgA%3D%3D
2024-05-30 19:58:50 +08:00
Boshen
89a1f97320
refactor(parser): improve expression parsing ( #3352 )
2024-05-19 21:28:16 +08:00
Boshen
e818fba21c
refactor(parser): improve parse_simple_arrow_function_expression ( #3349 )
2024-05-19 06:05:39 +00:00
Boshen
530455849b
chore(tasks): add commit sha to snapshots to make sure submodules are not outdated ( #3267 )
...
If submodules are outdated, it'll panic with the following message
```
Repository is outdated, please run `just submodules` to update it.
```
For us maintainers, we'll need the env `UPDATE_SNAPSHOT` to force an update.
2024-05-14 10:18:00 +00:00
Boshen
09f34fc942
refactor(semantic): unify diagnostic in checker
2024-05-12 01:07:28 +08:00
Dunqing
0ba7778e5e
fix(parser): correctly parse cls.fn<C> = x ( #3208 )
...
close : #3206
2024-05-09 10:23:45 +08:00
Dunqing
a227050ed0
chore: update babel repo ( #3205 )
2024-05-08 20:15:15 +08:00
Dunqing
220f722f19
chore: update snapshots ( #2817 )
...
Babel repo is updated in #2813 and #2814
2024-03-26 11:53:26 +08:00
Boshen
86ee074678
fix(parser): remove all duplicated comments in trivia builder ( #2689 )
2024-03-12 17:51:22 +08:00
Boshen
977c20b677
feat(coverage): add a duplicate comment check ( #2688 )
2024-03-12 16:52:34 +08:00
Boshen
6c6adb46d1
fix(ast): parse rest parameter with the correct optional and type annotation syntax ( #2686 )
...
closes #2653
2024-03-12 15:47:22 +08:00
Boshen
8a73d18fcf
chore(parser): make sure all span.end >= span.start ( #2681 )
...
closes #2679
2024-03-11 19:49:51 +08:00
Boshen
265b2fb640
feat: miette v7 ( #2465 )
2024-03-08 15:50:00 +08:00
Boshen
240ff19675
refactor(parser): improve parsing of BindingPattern in TypeScript ( #2624 )
...
closes #2622
2024-03-06 16:16:03 +08:00
Dunqing
197fa16613
feat(semantic): add check for duplicate class elements in checker ( #2455 )
...
1. Remove the check implementation of the parser
2. Implement it to semantic checker
3. Support typescript's check for duplicate class elements
Support checking for duplicate class elements in semantic checker is
easier to support typescript checking rules.
2024-02-21 14:10:19 +08:00
Boshen
ef336cb66b
feat(parser): recover from async x [newline] => x ( #2375 )
...
```javascript
async x
=> x
```
Babel recovers and displays "No line break is allowed before '=>'
2024-02-10 11:19:08 +08:00
Dunqing
a3570d41f0
feat(semantic): report parameter related errors for setter/getter ( #2316 )
2024-02-05 17:38:43 +08:00
Dunqing
9ca13d040d
feat(semantic): report type parameter list cannot be empty ( #2315 )
2024-02-05 16:05:51 +08:00
Dunqing
f53c54ced9
feat(semantic): report unexpected type annotation in ArrayPattern ( #2309 )
2024-02-05 13:45:52 +08:00
Boshen
650f6c942f
refactor: use our forked version of miette::Reporter for tests ( #2266 )
2024-02-02 16:15:31 +08:00
Dunqing
da2ffdf7a0
feat(semantic): check parameters property ( #2264 )
2024-02-02 15:58:32 +08:00
Dunqing
d71175e712
feat(semantic): check optional parameters ( #2263 )
2024-02-02 15:54:04 +08:00
Boshen
a69b76ab77
chore: update snapshots
2024-01-15 21:13:05 +08:00
Boshen
08438e04ba
refactor(parser): remove TokenValue::RegExp from Token ( #1926 )
...
This PR is part of #1880 .
`Token` size is reduced from 48 to 40 bytes.
To reconstruct the regex pattern and flags within the parser , the regex
string is
re-parsed from the end by reading all valid flags.
In order to make things work nicely, the lexer will no longer recover
from a invalid regex.
2024-01-08 13:48:52 +08:00
Dunqing
c3090c2c70
fix(parser): terminate parsing if an EmptyParenthesizedExpression error occurs ( #1874 )
...
close: https://github.com/oxc-project/oxc/issues/1870#issue-2061901976
2024-01-03 11:34:14 +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
7fca9504d2
chore: update snapshots
2023-11-28 16:27:10 +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
Boshen
1661385c1a
feat(semantic): check non-simple lhs expression of assignment expression ( #994 )
2023-10-14 23:40:10 +08:00
Boshen
b46f34e096
chore: bump submodules and snapshots
2023-10-06 16:15:35 +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
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
c5402c1cae
feat(linter): implement no-import-assign (nursery)
2023-07-01 11:20:31 +08:00
Boshen
925cee20c1
feat(parser): parse TypeScript this function parameter ( #464 )
2023-06-20 21:56:28 +08:00
Boshen
bad8bfcf16
ci: run conformance tests and bail if there are outdated snapshots ( #444 )
2023-06-14 21:44:10 +08:00
Boshen
1ed8df2d83
feat(parser): parse const type parameter from TypeScript v5.0 ( #416 )
2023-06-08 22:26:35 +08:00
Boshen
895d26ebf9
chore(coverage): update snapshot
2023-06-01 14:28:00 +08:00
Boshen
c613583544
chore(coverage): bump coverage status
2023-05-25 18:46:48 +08:00
Boshen
fc7a374e7c
feat(coverage): add a directory for tests
...
closes #363
2023-05-20 23:02:30 +08:00