You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SyntaxGraph: Usability and performance tweaks (#48)
* `copy_ast`: Add option to not recurse on `.source`, clarify docs, fix over-recursion
* `ensure_attributes!`: throw instead of attempting to mutate NamedTuple
* Add graph utils: `unfreeze_attrs`, `attrdefs`
* Print more information when node does not have attribute
* Fix printing for identifier-like kinds `String`/`Cmd` `MacroName`
* Do not coerce attrs to NamedTuple unnecessarily
For `ensure_attributes` and `delete_attributes`, the output graph's
`.attributes` now have the same type (`Dict` or `NamedTuple`) as the input.
Add `delete_attributes!` defined only on dict-attrs to be consistent with
`ensure_attributes!`
* Remove ineffective call to `freeze_attrs` converting from SyntaxNode
* Test `ensure`, `delete` attrs, `attrtypes`, `copy_ast`
---------
Co-authored-by: Shuhei Kadowaki <[email protected]>
Co-authored-by: Claire Foster <[email protected]>
0 commit comments