feat(ast_tools): support inlining custom deserialized fields with #[estree(raw_deser_inline)]#21133
Merged
graphite-app[bot] merged 1 commit intomainfrom Apr 7, 2026
Conversation
This was referenced Apr 7, 2026
Member
Author
This was referenced Apr 7, 2026
This was referenced Apr 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support in ast_tools for inlining custom raw-transfer deserializer fields by introducing a new #[estree(raw_deser_inline)] meta attribute and updating the raw-transfer code generator to place converter preambles either before object literals (inline) or before post-construction assignments.
Changes:
- Extend
ESTreeMetawith araw_deser_inlineflag and parse it from#[estree(raw_deser_inline)]. - Update raw-transfer struct deserializer generation to track two preamble phases (inline vs assignment) and propagate an “inline-capable” flag from custom converters.
- Adjust converter application API to return both the value expression and whether it can be inlined.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tasks/ast_tools/src/schema/extensions/estree.rs | Adds raw_deser_inline metadata flag on ESTree meta converters. |
| tasks/ast_tools/src/generators/raw_transfer.rs | Splits generator preamble into inline vs assignment phases; threads “inline-capable” through converter application and field generation. |
| tasks/ast_tools/src/derives/estree.rs | Parses #[estree(raw_deser_inline)] and sets the meta flag accordingly. |
34ca616 to
68caa55
Compare
3c40fb4 to
56d49d6
Compare
68caa55 to
0626c79
Compare
56d49d6 to
f5552d3
Compare
0626c79 to
25ba749
Compare
Contributor
Merge activity
|
…estree(raw_deser_inline)]` (#21133) Add an `#[estree(raw_deser_inline)]` attribute which can be used on custom deserializers. Like automatically-generated deserializers, where the value does not require `parent`, it can be set as an object property inline, rather than assigned after constructing the AST node object.
f5552d3 to
c0278ab
Compare
25ba749 to
7b3d5a9
Compare
Base automatically changed from
om/04-07-perf_napi_parser_linter_plugins_use_int32array_in_raw_transfer_deserializer
to
main
April 7, 2026 17:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add an
#[estree(raw_deser_inline)]attribute which can be used on custom deserializers. Like automatically-generated deserializers, where the value does not requireparent, it can be set as an object property inline, rather than assigned after constructing the AST node object.