Skip to content

Conversation

@soareschen
Copy link
Collaborator

@soareschen soareschen commented Dec 8, 2024

Partial work toward #26.

  • Introduce replace_with! macro that allows replacement of an identifier with a list of component types in the body.
  • Introduce for_each_replace! macro that allows repeated replacement of an identifier with each element of components in the list in the body.
  • Rename define_components! to cgp_preset!.
  • Use replace_with! inside the generated with_preset! macro.
  • Re-introduce the IsPreset trait to allow bulk delegation of components.

Note: The current cgp_preset! macro works very poorly when there are generic parameters inside the component name or the preset name. It is currently only usable without generic parameters.

@soareschen soareschen merged commit 287acd4 into main Dec 8, 2024
5 checks passed
@soareschen soareschen deleted the preset-macros branch December 8, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants