localstack / airspeed

A Python implementation of Velocity templates, tailored to VTL in AWS (e.g., API Gateway, AppSync)
Other
2 stars 1 forks source link

Support for hypens on identifiers #4

Closed calvernaz closed 1 year ago

calvernaz commented 1 year 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