Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for identifiers using hyphens #61

Open
calvernaz opened this issue Nov 9, 2022 · 0 comments
Open

Support for identifiers using hyphens #61

calvernaz opened this issue Nov 9, 2022 · 0 comments

Comments

@calvernaz
Copy link
Contributor

calvernaz commented Nov 9, 2022

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?

https://velocity.apache.org/engine/2.3/vtl-reference.html#set-establishes-the-value-of-a-reference - parser.allow_hyphen_in_identifiers

@calvernaz calvernaz changed the title Support for dashed identifiers Support for identifiers using hyphens Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant