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

Implemented parsing of range literals #192

Merged
merged 1 commit into from
Apr 5, 2018
Merged

Implemented parsing of range literals #192

merged 1 commit into from
Apr 5, 2018

Conversation

ilyapuchka
Copy link
Collaborator

This is alternative implementation of #179 that does not introduce new syntax for loops and automatically supports if-in expressions.
If we merge #175 we could even support open ranges, but for now only closed ranges are supported.

Closes #179
Closes SwiftGen/StencilSwiftKit#74

@ilyapuchka ilyapuchka requested a review from kylef January 23, 2018 15:38
@@ -173,7 +173,7 @@ func testForNode() {
.block(value: "for i"),
]
let parser = TokenParser(tokens: tokens, environment: Environment())
let error = TemplateSyntaxError("'for' statements should use the following 'for x in y where condition' `for i`.")
let error = TemplateSyntaxError("'for' statements should use the following syntax:\n`for x in y where condition`")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TemplateSyntaxError message is expected to be a single line

@kylef kylef merged commit fe01beb into master Apr 5, 2018
@kylef kylef deleted the range-variable-1 branch April 5, 2018 00:57
@kylef kylef restored the range-variable-1 branch April 5, 2018 01:02
@kylef kylef deleted the range-variable-1 branch April 5, 2018 01:03
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

Successfully merging this pull request may close these issues.

For range loop or alternative
2 participants