ocaml-ppx / ppxlib

Base library and tools for ppx rewriters
MIT License
244 stars 94 forks source link

Context_free: add a special_function' variant #496

Closed Octachron closed 1 month ago

Octachron commented 1 month ago

Parsing Longindent.ts is quite unpractical because Longident.t are used as an IR for different and distinct syntaxic classes. This means that interpreting the string argument of the Context_free.special_function is less trivial than it appears.

To circumvent this issue, this commit takes the view that in complex cases the user themself can still easily specify the identifier that they intended to use.

Thus it sounds sensible to provides a special_function' variant function which takes directly a Longident.t argument for advanced uses.

NathanReb commented 1 month ago

I missed that the DCO check's unhappy. If you can fix this, I'll merge right after!

Octachron commented 1 month ago

The identity confusion and the location of the change entry should be fixed now.

NathanReb commented 1 month ago

I just fixed the formatting, will merge when the CI's green.