Closed tzlaine closed 7 months ago
Also, add a section to the rationale for why we have two kinds of directives. The reason is that it is possible (and desirable) to have some directives simply modify their parser, and other times it is not. merge[]
just modifies its parser, but transform(f)
probably cannot -- if it did, we'd have to adjust every single parser to return the transformed attribute instead of the default generated one.
This should go in the "Directives" page. It matters because
a >> b >> c
andd[a >> b] >> c
have different types ifd[]
creates a new parser. Ifd[]
does not (likemerge[]
andseparate[]
), the type of the two original expressions above might be the same (modulo the changes brought by usingmerge[]
/separate[]
).