Closed leepike closed 11 years ago
Do you need to antiquote compound initializers? If not, you can use expression antiquotes. If you need support for antiquoting compound initializers, I would be happy to accept a patch.
Do you need to antiquote compound initializers?
In my case, yes. I'm generating (possibly) nested compound initializers.
I would be happy to accept a patch.
I got this working just generating the AST directly. I started trying to add the antiquote, but it wasn't obvious how to do so. I don't know if I'll get to it, so I'll close the issue. I'm guessing you can add it much quicker than I can, and I think it would be a nice addition, but it's your call whether it's worthwhile!
Let's leave it open :) I'll get to it, just not right away.
Please try master and let me know whether or not it solves this issue. If not, please provide an example of quasiquotation that you think should work but doesn't.
I did a quick test, and ran into the following:
Language/C/Syntax.hs:419:5: Warning: Pattern match(es) are non-exhaustive In an equation for `locOf': Patterns not matched: AntiInit AntiInits
and
Language/C/Pretty.hs:294:5: Warning: Pattern match(es) are non-exhaustive In an equation for `ppr': Patterns not matched: AntiInit AntiInits
The first one seemed to cause an error (non-exhaustive pattern) for me.
OK, please try again.
Yep, everything seems to work! Thanks again.
Hi, would it be possible to have an antiquote specifier for the Initializer type? There doesn't seem to be one, and it would be quite useful.