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

Allow access to current value of iterator #236

Closed
jvdb opened this issue Apr 11, 2018 · 0 comments
Closed

Allow access to current value of iterator #236

jvdb opened this issue Apr 11, 2018 · 0 comments
Assignees
Milestone

Comments

@jvdb
Copy link
Contributor

jvdb commented Apr 11, 2018

With tokens such as Rep and RepN, it is often useful to be able to access the value of N, which refers to the current iteration count of the loop.

  1. Should this the 0 or 1-based? -> 0-based seems logical, given that other ValueExpressions use it too.
  2. What about nested loops? Default would seem to always refer to the (current) deepest loop, but are there use cases that require access to multiple levels? -> Implement simplest support first, which is only returning the index of the deepest (= current) level.
@jvdb jvdb added this to the 7.2.0 milestone Jun 30, 2018
@jvdb jvdb self-assigned this Jun 30, 2018
jvdb added a commit that referenced this issue Jul 4, 2018
mvanaken added a commit that referenced this issue Jul 17, 2018
… iterable and counting siblings a long the way.
jvdb added a commit that referenced this issue Jul 18, 2018
mvanaken added a commit that referenced this issue Jul 20, 2018
…nd count the iterations of the iterable afterwards.
jvdb added a commit that referenced this issue Jul 21, 2018
mvanaken added a commit that referenced this issue Jul 24, 2018
mvanaken added a commit that referenced this issue Aug 20, 2018
…within ParseState, instead of extracting it out of the ParseGraph. The iteration is now independent on the parse result.
mvanaken added a commit that referenced this issue Aug 20, 2018
jvdb added a commit that referenced this issue Sep 3, 2018
jvdb added a commit that referenced this issue Sep 16, 2018
jvdb added a commit that referenced this issue Sep 16, 2018
@jvdb jvdb closed this as completed in 762b9f1 Sep 17, 2018
@jvdb jvdb added the major label Sep 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants