Boshen
7e130e56f8
refactor(ast): remove Option around all ImportOrExportKind
2023-05-05 22:39:29 +08:00
Boshen
a2be3bd227
refactor(ast): remove unnecessary ModuleDeclarationKind
2023-05-05 22:04:26 +08:00
Boshen
64ed8613a4
refactor(ast): remove unnecessary box from AssignmentTargetMaybeDefault::AssignmentTarget
2023-05-04 22:56:20 +08:00
Wenzhe Wang
638576c323
fix(ast): replace ArrayElementType ( #330 )
2023-05-04 20:33:58 +08:00
Boshen
99fdaad03a
chore(rust): bump bitflags to v2
2023-05-04 12:24:47 +08:00
Boshen
cd276c2850
feat: add oxc_span crate ( #323 )
2023-04-27 21:51:15 +08:00
Boshen
1004a1d197
chore: clean up workspace dependencies ( #320 )
2023-04-27 11:38:39 +08:00
Boshen
08dfbc98b2
fix(oxc_ast,oxc_parser): fix clippy warnings
2023-04-22 16:24:50 +08:00
Boshen
f382d36375
chore: publish crates v0.0.6
2023-04-22 16:09:05 +08:00
Boshen
080baaa2db
chore: use taplo to reformat toml files
2023-04-22 15:58:59 +08:00
Boshen
7f946fb75d
chore: bump nightly to nightly-2023-04-20 ( #304 )
2023-04-20 23:35:38 +08:00
Boshen
42859b3b51
fix(parser): fix fuzzer
2023-04-18 10:35:09 +08:00
Boshen
7f0b16fb9c
chore: remove some unused code
2023-04-17 23:25:57 +08:00
Boshen
f79f0eb631
refactor(oxc_ast): change SourceType::with_ methods to return Self
2023-04-16 21:32:00 +08:00
Boshen
bfea368524
chore: remove target_arch from std::mem::size_of checks
2023-04-16 21:08:12 +08:00
Boshen
d29bf62904
refactor(parser): remove some unused expression branchings
2023-04-16 12:26:58 +08:00
Boshen
6cbfc29c90
refactor(parser): remove some useless derive(Debug)
2023-04-16 12:19:39 +08:00
Boshen
ca0e80691c
refactor(oxc_parser): remove unused re_lex_as_typescript_r_angle
2023-04-16 12:15:49 +08:00
Boshen
fec5aafbf1
refactor(oxc_parser): remove a few unused diagnostics
2023-04-15 18:13:15 +08:00
Boshen
4939eeab6a
refactor(oxc_ast): cleanup docs and exports
2023-04-15 18:02:17 +08:00
Boshen
fc7cad9120
fix(parser): reset [In] context in parse_function
2023-04-13 22:16:48 +08:00
Boshen
040ac8256f
Release
2023-04-10 22:35:05 +08:00
Boshen
bb18132da5
refactor(oxc_diagnostics): remove error declarations
...
Make this crate not dependent on `oxc_ast`
2023-04-10 22:21:05 +08:00
Boshen
48736e53af
fix(parser): fix panic in unexpected token
2023-04-10 21:57:31 +08:00
Boshen
024f1a1552
fix(parser): fix [+In] Destructuring Binding Pattern Initializer ( #267 )
2023-04-06 21:47:07 +08:00
Boshen
398dbfd2a7
fix(paresr): parse [+In] in template ( #266 )
...
relates #255
2023-04-06 21:37:34 +08:00
Boshen
6360bdad31
fix(parser): fix [+in] context in CallArguments ( #265 )
...
relates #255
2023-04-06 21:02:30 +08:00
Wei Zhu
f9347b55b7
fix(parser): fix parse error on JSXText preceded by JSXFragment ( #262 )
...
Current implement was unable to parse `<div><></>foo</div>`, as `foo` was identified as Identifier.
2023-04-06 17:17:46 +08:00
Boshen
dc090208c4
fix(parser): fix crashing on empty ParenthesizedExpression with comments ( #263 )
...
relates #232
2023-04-06 17:16:15 +08:00
Wei Zhu
b17181a0c4
fix(parser): fix additional char being consumed in JSXText ( #259 )
2023-04-06 13:52:04 +08:00
Boshen
513931f672
Release oxc_ast@0.0.4 oxc_parser@0.0.4 oxc_semantic@0.0.3
2023-04-05 20:59:50 +08:00
Boshen
0674899b88
Fuzz async ( #257 )
...
* fix(parser): parse `async(...null)` as call expression
relates #255
* fix(parser): parse `null?async():null`
relates #255
2023-04-05 14:36:37 +08:00
Boshen
1c2acd121c
refactor(parser): clean up parsing of ForStatement ( #251 )
...
closes #176
2023-04-04 22:36:35 +08:00
Boshen
236d53ad9d
fix(parser): fix panic on multi-byte char in ExpectCatchFinally error
2023-04-02 20:09:38 +08:00
Boshen
089c2ba0ca
Release 0.0.3
2023-04-02 16:59:15 +08:00
Boshen
36f4a12b9f
chore: update README about conformance
2023-04-02 16:41:53 +08:00
Boshen
7db1643425
fix(parser): allow non-last rest element in ambient contexts
2023-04-02 16:41:53 +08:00
Boshen
adedc1a405
feat(parser): parse jsx element and fragment in JSXAttributeValue
2023-04-02 16:41:53 +08:00
Boshen
1130f48278
feat(parser): parse ts satisfies operator
2023-04-02 16:41:53 +08:00
Boshen
90e2d386d7
fix(parser): do not check static prototype in ambient contexts
2023-04-02 16:41:53 +08:00
Boshen
a62c9335a2
fix(parser): fix remaining errors around auto accessors
2023-04-02 16:41:53 +08:00
Boshen
96ad67db92
fix(parser): clean up type arguments parsing ( #242 )
...
closes #169
2023-04-02 12:06:52 +08:00
Boshen
fb01c4e210
Release 0.0.2
2023-04-02 00:50:05 +08:00
Boshen
e576b50fe2
docs(parser): add details
2023-04-02 00:23:21 +08:00
Boshen
61d2aedd43
docs(oxc_parser): add section on performance and visitor
2023-04-02 00:11:19 +08:00
Boshen
b11f774c41
refactor(oxc_parser): clean up doc
2023-04-01 19:03:33 +08:00
Boshen
d917348f9b
refactor(ast,parser): move parsing context from ast to parser
2023-04-01 18:01:33 +08:00
Boshen
249cf96ad2
refactor(ast): make serde an optional feature ( #236 )
...
This should also reduce compilation time a bit
oxc_parser compilation time 9.5s -> 8.8s
relates to #223
2023-04-01 17:12:23 +08:00
Boshen
f2fcbb30c3
refactor(oxc_parser): removed not needed generic from unexpected function
2023-04-01 15:59:42 +08:00
Boshen
d4ff0bb40e
refactor(oxc_parser): parser and lexer does not need to share the errors vec
2023-04-01 15:59:42 +08:00
Boshen
174330561c
fix(parser): fix panic on multi-byte characaters ( #233 )
...
* fix(oxc_parser): fix panic when EOF on a multi-byte character
relates #232
* fix(parser): fix panic on multi-byte char in private identifer
relates #232
2023-04-01 13:34:18 +08:00
Boshen
d232199e1c
refactor(parser): return Rc<Trivias> from TriviaBuilder ( #231 )
...
closes #229
2023-03-31 09:02:48 -07:00
Boshen
79fd35c9cb
deps: fix versions depending on each other
2023-03-30 23:59:41 +08:00
Boshen
9f7758465b
Release 0.0.1
...
oxc_allocator@0.0.1
oxc_ast@0.0.1
oxc_diagnostics@0.0.1
oxc_parser@0.0.1
oxc_printer@0.0.1
oxc_semantic@0.0.1
Generated by cargo-workspaces
2023-03-30 23:37:25 +08:00
Boshen
9e3675a575
chore: clean up Cargo.toml
2023-03-30 23:27:26 +08:00
yangchenye
929b0efebb
feat(linter): implement isolated_declaration ( #209 )
...
* feat(linter): implement isolated_declaration
* Implement check for class elements
* Set up Export SymbolFlag and store declaration AST in Symbol
* Fix tests and comments
2023-03-26 04:37:10 -07:00
Boshen
ff9a2c3ab0
feat(linter): eslint disable comments ( #196 )
...
feat(linter): eslint disable comments
closes #100
closes #170
2023-03-22 11:27:42 +08:00
yangchenye
4549fb3cdd
fix(parser): parse decorator with separate grammar ( #192 )
2023-03-19 11:35:59 +08:00
Boshen
37c7b7a752
refactor(oxc_parser): simply diagnostic messages
2023-03-18 14:39:44 +08:00
Boshen
14babe92a0
refactor(oxc_parser): remove unused diagnostics
2023-03-18 14:05:29 +08:00
Boshen
57f3065d68
refactor: remove unused #[allow(clippy:..)]
2023-03-17 13:28:06 +08:00
Boshen
bee548b945
fix(coverage): correct the number on AST Parsed
2023-03-17 11:15:33 +08:00
yangchenye
37ad6f3a15
feat(parser): support decorators in class expression ( #190 )
...
feat(parser): support decorator in class expression
2023-03-17 09:33:04 +08:00
Boshen
297ce2743f
Revert "feat(linter): check await in class static block"
...
This reverts commit 7add71c9dd .
2023-03-14 07:56:04 +08:00
Boshen
7add71c9dd
feat(linter): check await in class static block
2023-03-14 07:46:11 +08:00
Boshen
78bd76e8d0
feat(parser): check function name for await and yield
2023-03-14 07:39:07 +08:00
Boshen
2fe8fba5b6
refactor(lexer): make TokenValue 8 bytes smaller by changing RegExp.pattern to &'a str ( #175 )
2023-03-13 23:20:52 +08:00
Boshen
f36e3301fd
refactor(lexer): change TokenValue::String(Atom) to TokenValue::String(&str) ( #174 )
2023-03-13 09:33:44 +08:00
Boshen
fce6e1ec73
feat(parser): check YieldExpression
2023-03-12 23:41:27 +08:00
Boshen
88fd0a05ec
feat(parser): check AwaitExpression
2023-03-12 23:37:21 +08:00
Boshen
d6e8c6fb2f
feat(parser): check ReturnStatement in return context
2023-03-12 23:30:32 +08:00
Boshen
93b06e948a
feat(ast_parser): check await and yield identifier error
2023-03-12 23:22:10 +08:00
Boshen
605684f4c0
fix: fix clippy warnings
2023-03-12 21:53:08 +08:00
Boshen
66207e74a4
refactor(lexer): remove LexerContext::JsxChild ( #172 )
2023-03-12 20:19:51 +08:00
Shannon Rothe
901f4948c1
refactor(parser): move import specifier parsing to list.rs ( #167 )
2023-03-12 10:45:02 +08:00
Boshen
1b93d83ff7
chore(oxc_parser): setup fuzzer
...
closes #155
2023-03-12 00:44:42 +08:00
Boshen
c2f760f1ed
chore: run `types -w" to fix all typos
2023-03-11 23:37:19 +08:00
Boshen
d5075a95e9
fix(linter): diagnostics should not print quotes
2023-03-11 17:44:27 +08:00
Boshen
a5f00e8e1c
refactor(oxc_ast): remove unnecessary SourceTypeBuilder
2023-03-11 16:21:14 +08:00
Boshen
5c8670d1c8
feat(semantic): declare symbol and reference Identifier
2023-03-10 23:28:51 -08:00
Boshen
2ee0b40656
chore: fix clippy warnings
2023-03-10 11:09:44 -08:00
Boshen
94fdd54368
perf(lexer): fine tune identifier checking with less redundant branches ( #154 )
...
perf(lexer): fine tune checking of identifiers with less redundant branches
2023-03-08 22:00:15 +08:00
Boshen
4d32bfb55e
refactor: remove all declarations of const fn, which is useless for us
2023-03-07 21:29:47 +08:00
Boshen
6b9bbaa091
perf(lexer): try &static Atom for match_keyword ( #143 )
...
* perf(lexer): try phf_map for `match_keyword`
* wip
2023-03-07 13:14:22 +08:00
Boshen
c8e968f35d
perf(ast): shrink some struct sizes
...
relates #138
2023-03-06 06:29:18 -08:00
Fnll
81760da7cc
feat(parser): better diagnostic for missing semicolon in for loop statement ( #133 )
...
feat(parser): better diagnostic
Co-authored-by: kerui.lian <kerui.lian@bytedance.com>
2023-03-05 04:13:23 -08:00
Boshen
94fddffc70
chore: use fancy-no-backtrace from miette
...
See https://github.com/zkat/miette/issues/132
2023-03-05 15:16:26 +08:00
Yoni Feng
dcfdce5bb7
refactor(lexer): avoid copying of self in SIMD functions ( #104 )
2023-03-03 21:46:55 -08:00
Ye Yangchen
b06ab627bf
fix(oxc_parser) correct span for decorators
2023-03-02 21:34:24 -08:00
Shannon Rothe
6647752e03
refactor(ast): change Option<Vec> to Vec for decorators ( #84 )
...
* remove `Option<Vec>` from `FormalParameter`
* `unwrap` -> `unwrap_or_else`
* prefer `AstBuilder` helper
* implement `consume_decorators`
2023-03-02 15:52:46 +08:00
Ye Yangchen
d8c6caf57f
feat(oxc_parser): Parse modifiers before declaration
2023-03-01 22:50:23 -08:00
Shannon Rothe
143edeb62f
prepend TS error code
2023-03-01 20:47:52 -08:00
Shannon Rothe
df78044c87
lint
2023-03-01 20:47:52 -08:00
Shannon Rothe
bc6a6d50ea
remove TODO
2023-03-01 20:47:52 -08:00
Shannon Rothe
4d894e7db1
parser: prevent JSX expressions using comma operator
2023-03-01 20:47:52 -08:00
Boshen
3b887dbeaf
feat(parser): print json in parser example
2023-02-28 00:05:54 +08:00
Boshen
73ea3d6361
feat(ast,lexer,linter): save and check comments
2023-02-27 12:31:57 +08:00
Ye Yangchen
0bf8f817f5
feat(oxc_parser): Port isStartOfDeclaration form tsc
2023-02-27 12:27:44 +08:00
Xuan
6b43cbbe71
fix(oxc_parser): support export type with star symbol
2023-02-27 12:26:23 +08:00
Xuan
b6d09643e5
fix(oxc_parser): check access correctly
2023-02-27 03:10:02 +08:00
Boshen
915518b614
refactor(oxc_diagnostics): s/PError/Error
2023-02-26 02:02:05 +08:00
Xuan
457e85b4a0
fix(oxc_parser): check ambiguous for await
2023-02-24 12:46:59 +08:00
Boshen
4684118c9e
fix: change example names so their binary names don't collide with each other
2023-02-23 21:46:39 +08:00
Xuan
65e81ce12c
fix(oxc_parser): eat decorator for export
2023-02-23 12:28:34 +08:00
Boshen
4f4a9802b7
refactor(diagnostics,parser): move diagnostics to parser
2023-02-22 19:23:01 +08:00
Boshen
7a44a657e1
feat: add miette fancy report to examples
2023-02-22 19:23:01 +08:00
Boshen
5390d3e6b4
refactor(diagnostic): change Err type to miette::Error
...
This is the prerequisite for breaking up the large Diagnostic enum.
2023-02-22 11:08:21 +08:00
Boshen
4c6407b152
refactor(ast): s/node/span
...
This corrects the jargon for span. The term `node` came from `estree`,
which is a bit misleading here in Rust.
closes #9
2023-02-21 19:17:49 +08:00
Boshen
f3a7d5a026
feat(ast): add RegExpFlags bitflag for storing regex flags
...
This reduces `TokenValue` from 56 to 40 bytes, `Token` from 72 to 56 bytes.
2023-02-21 18:22:15 +08:00
Boshen
a733856536
refactor(ast,parser): use u32 for node spans
...
The next PR will fix the jargon where Node = Span.
relates to #9
2023-02-21 16:02:23 +08:00
Boshen
39a05030d7
refactor(ast,parser): box FormalParameters
2023-02-21 13:11:58 +08:00
Boshen
d57ab2f088
refactor(ast,parser): remove Node::ctx
...
This is adding too many bytes to the AST
2023-02-21 13:11:58 +08:00
Boshen
c640b4fb08
perf(ast): box PropertyKey enum
2023-02-21 13:11:58 +08:00
Boshen
cf278a2760
perf(parser): a few micro optimizations
2023-02-21 13:11:58 +08:00
Boshen
0bbbc7768f
perf(oxc_parser): use u8 for offset
2023-02-21 13:11:58 +08:00
Boshen
83c3f34af2
feat(lexer): use portable-SIMD to speed up multiline comment scanning
2023-02-20 21:58:08 +08:00
Boshen
ab68cea0b7
perf(lexer): use portable-SIMD to speed up whitespace scanning
...
closes #13
2023-02-20 19:03:15 +08:00
Xuan
362c02f8e1
docs(oxc_parser): add header symbol for parser.unexpected
2023-02-18 09:06:56 +08:00
Boshen
a347e3993e
Revert "perf(lexer): use portable-SIMD to speed up multiline comment scanning"
...
This reverts commit a51c7f9ba2 .
2023-02-17 14:50:42 +08:00
Boshen
a51c7f9ba2
perf(lexer): use portable-SIMD to speed up multiline comment scanning
2023-02-15 19:51:13 -08:00
Boshen
85955d7147
refactor(parser): clean up some lexer code
2023-02-12 21:34:19 +08:00
Boshen
d8fd23524a
feat(oxc_parser): allow filename as option in examples/simple.rs
2023-02-12 15:57:40 +08:00
Boshen
3daf5bcea9
chore(example): add an example for testing purposes
2023-02-12 11:11:35 +08:00
Boshen
1fdc635638
feat(parser): add parser
2023-02-11 05:26:49 -08:00
Boshen
4ae70b9592
feat(parser): add lexer
2023-02-11 02:29:54 -08:00
Boshen
d026e33343
chore: add rust-toolchain.toml and Cargo.toml
2023-02-11 13:03:40 +08:00