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

Exposing a proper iterator in "com.sonalake.utah.Parser" #29

Open
sgoeschl opened this issue Nov 8, 2021 · 3 comments
Open

Exposing a proper iterator in "com.sonalake.utah.Parser" #29

sgoeschl opened this issue Nov 8, 2021 · 3 comments
Milestone

Comments

@sgoeschl
Copy link
Contributor

sgoeschl commented Nov 8, 2021

In order to integrate with Apache FreeMarker I implemented an iterator (see https://github.com/apache/freemarker-generator/blob/master/freemarker-generator-tools/src/main/java/org/apache/freemarker/generator/tools/utahparser/impl/ParserWrapper.java)

Does it make sense to expose a Parser#iterator method out-of-the-box?

@daniel-bray-sonalake
Copy link
Collaborator

Looks nice; if you wanted to issue a PR with this and some tests we can include it in the next release.

@daniel-bray-sonalake daniel-bray-sonalake added this to the V1.1.1 milestone Nov 9, 2021
@sgoeschl
Copy link
Contributor Author

sgoeschl commented Nov 9, 2021

Please have a look at https://github.com/sgoeschl/utah-parser/tree/UTAHPARSER-29

  • Deprecating "Parser#next"? Mixing that with an iterator will cause problems ...
  • Enforcing a single iterator only for a given Parser instance?

@daniel-bray-sonalake
Copy link
Collaborator

We'll ponder this a little

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

2 participants