Velocity supports hyphenated identifiers if configured by changing the parser configuration. I made a PR that adds support for that. Still, I'd like to know from you what would be the best approach to make that conditional, similar to what Velocity does at the moment - only support dashed identifiers if the parser is configured to do so.
We have a couple of options:
Create two conditional regex attributes, depending on the configuration setting (defaulting to the existing behaviour).
Do some attribute reassignment using __call__, but probably to much magic for what it's worth.
Nevertheless, we would need some transversal way to pass the parser configuration into the parsing classes. Any ideas?
Velocity supports hyphenated identifiers if configured by changing the parser configuration. I made a PR that adds support for that. Still, I'd like to know from you what would be the best approach to make that conditional, similar to what Velocity does at the moment - only support dashed identifiers if the parser is configured to do so.
We have a couple of options:
__call__
, but probably to much magic for what it's worth.Nevertheless, we would need some transversal way to pass the parser configuration into the parsing classes. Any ideas?
https://velocity.apache.org/engine/2.3/vtl-reference.html#set-establishes-the-value-of-a-reference - parser.allow_hyphen_in_identifiers