Closed peng1999 closed 5 years ago
Thanks for the PR!
I'm a little wary to do this though as I unfortunately can't really understand the macro any more at this point :(. Would it be possible to have a simpler implementation which perhaps doesn't have as many bells-and-whistles but still gets the job done?
AFIK if-statement with an unconditional fallback can be handled more simply, but it is impossible to match a if-statement without unconditional fallback using a repetition matcher.
But my current solution is just a straightforward implementation of a incremental TT munchers, and I will add a detailed comment later. Will that help?
Comments added.
Is this PR still active? This would be a very useful feature to have
Ah sorry for the... very long delay here. I don't think I'm personally interested in maintaining this in this repository, so I'm going to close this.
This continues to be a very useful feature to have. Would you reconsider maintaining this?
This implements issue #6 . Original code are not touched, and just the original
cfg_if
is renamed to__flat_cfg_if
. The newcfg_if
macro is a wrapper over it, using the TT builder to handle nested if.