-
Notifications
You must be signed in to change notification settings - Fork 17
Description
What should we call the derive?
The implemented plumbing trait is FromPest
. That's not what this discussion is about.
This is about the derive naming, which is currently #[derive(FromPest)]
.
This is nice, because it says what it does on the tin: it derives FromPest
for the type.
But especially if we add a way to derive precedence climbing, it might make sense to split the derives into multiple.
Additionally, the current #[derive(FromPest)]
is both in a separate crate from the trait FromPest
(pest-ast and from-pest, respectively), as well as using #[pest_ast(..)]
as its "attribute namespace" for additional information on the type and fields.
If PrecClimb
gets its own derive (which I think could very well be beneficial both to internal code organization of the derive crate and the derive API), then I think the main derive should be renamed away from just the generic FromPest
, as it doesn't cover all derive possibilities anymore.