Skip to content

Commit a5e0c7a

Browse files
autofix-ci[bot]Boshen
authored andcommitted
[autofix.ci] apply automated fixes
1 parent ff42bac commit a5e0c7a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

crates/oxc_parser/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Oxc Parser for JavaScript and TypeScript
22

33
Oxc's [`Parser`] has full support for
4+
45
- The latest stable ECMAScript syntax
56
- TypeScript
67
- JSX and TSX
@@ -16,16 +17,18 @@ let parser_return = Parser::new(&allocator, &source_text, source_type).parse();
1617
```
1718

1819
# Abstract Syntax Tree (AST)
20+
1921
Oxc's AST is located in a separate [`oxc_ast`] crate. You can find type definitions for AST
2022
nodes [here][`oxc_ast::ast`].
2123

2224
# Performance
2325

2426
The following optimization techniques are used:
25-
* AST is allocated in a memory arena ([bumpalo](https://docs.rs/bumpalo)) for fast AST drop
26-
* [`oxc_span::Span`] offsets uses `u32` instead of `usize`
27-
* Scope binding, symbol resolution and complicated syntax errors are not done in the parser,
28-
they are delegated to the [semantic analyzer](https://docs.rs/oxc_semantic)
27+
28+
- AST is allocated in a memory arena ([bumpalo](https://docs.rs/bumpalo)) for fast AST drop
29+
- [`oxc_span::Span`] offsets uses `u32` instead of `usize`
30+
- Scope binding, symbol resolution and complicated syntax errors are not done in the parser,
31+
they are delegated to the [semantic analyzer](https://docs.rs/oxc_semantic)
2932

3033
<div class="warning">
3134
Because [`oxc_span::Span`] uses `u32` instead of `usize`, Oxc can only parse files up
@@ -94,6 +97,7 @@ fn main() -> Result<(), String> {
9497
```
9598

9699
### Parsing TSX
100+
97101
```rust
98102
use oxc_allocator::Allocator;
99103
use oxc_parser::{Parser, ParserReturn};

0 commit comments

Comments
 (0)