-
Notifications
You must be signed in to change notification settings - Fork 7
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
for...in
-loops & iterators
#7
Comments
#90 and d1f2f80 show up general problems with Tokay's parentheses-less syntax attempt. The syntax of for-loops is currently a stopgap and trade-off between C/awk-style, Rust/Python-style and Tokay's own syntactic specialities. The iterator-part can only be a Statement, not a Sequence, as expressed in
This allows for simple
but it's getting stuck here
which will throw a syntax error with d1f2f80. Note, that previously, even less was possible, though! The syntax is disambiguating here, and
is an acceptable, but not nice workaround. Also, generally adding parentheses to the syntax would solve the problem.
would enforce the original C/awk-style syntax
but this isn't wanted due personal preference, and Tokay's "different" syntax from existing syntax. Generally, maybe its better to reinforced |
#101 is the first pull request on this topic. |
#101 merged, issue fixed. |
To implement the
for...in
-loop construct in Tokay, it is required to make iterators available for values like dict, list or string.The text was updated successfully, but these errors were encountered: