purcell / airspeed

A lightweight Python template engine compatible with Velocity, used in OpenStack
Other
91 stars 37 forks source link

Support for identifiers using hyphens #61

Open calvernaz opened 2 years ago

calvernaz commented 2 years ago

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:

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