Skip to content

Commit

Permalink
feat(parser): Generate Serialize impls in ast_tools (#6404)
Browse files Browse the repository at this point in the history
Beginning of #6347. Instead of using serde-derive, we generate
`Serialize` impls manually.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: overlookmotel <theoverlookmotel@gmail.com>
  • Loading branch information
3 people authored Oct 19, 2024
1 parent b0b6ac7 commit e310e52
Show file tree
Hide file tree
Showing 42 changed files with 6,994 additions and 1,212 deletions.
4 changes: 4 additions & 0 deletions .github/.generated_ast_watch_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ src:
- 'crates/oxc_ast/src/generated/derive_content_hash.rs'
- 'crates/oxc_regular_expression/src/generated/derive_content_hash.rs'
- 'crates/oxc_syntax/src/generated/derive_content_hash.rs'
- 'crates/oxc_ast/src/generated/derive_estree.rs'
- 'crates/oxc_regular_expression/src/generated/derive_estree.rs'
- 'crates/oxc_span/src/generated/derive_estree.rs'
- 'crates/oxc_syntax/src/generated/derive_estree.rs'
- 'crates/oxc_ast/src/generated/assert_layouts.rs'
- 'crates/oxc_ast/src/generated/ast_kind.rs'
- 'crates/oxc_ast/src/generated/ast_builder.rs'
Expand Down
12 changes: 8 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ oxc_codegen = { version = "0.31.0", path = "crates/oxc_codegen" }
oxc_data_structures = { version = "0.31.0", path = "crates/oxc_data_structures" }
oxc_diagnostics = { version = "0.31.0", path = "crates/oxc_diagnostics" }
oxc_ecmascript = { version = "0.31.0", path = "crates/oxc_ecmascript" }
oxc_estree = { version = "0.31.0", path = "crates/oxc_estree" }
oxc_index = { version = "0.31.0", path = "crates/oxc_index" }
oxc_isolated_declarations = { version = "0.31.0", path = "crates/oxc_isolated_declarations" }
oxc_mangler = { version = "0.31.0", path = "crates/oxc_mangler" }
Expand Down
4 changes: 1 addition & 3 deletions crates/oxc_ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ doctest = false
[dependencies]
oxc_allocator = { workspace = true }
oxc_ast_macros = { workspace = true }
oxc_estree = { workspace = true }
oxc_regular_expression = { workspace = true }
oxc_span = { workspace = true }
oxc_syntax = { workspace = true }
Expand All @@ -30,16 +31,13 @@ num-bigint = { workspace = true }

serde = { workspace = true, features = ["derive"], optional = true }
serde_json = { workspace = true, optional = true }

tsify = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }

[features]
default = []
serialize = [
"dep:serde",
"dep:serde_json",
"dep:tsify",
"dep:wasm-bindgen",
"oxc_allocator/serialize",
"oxc_regular_expression/serialize",
Expand Down
Loading

0 comments on commit e310e52

Please sign in to comment.