-
Notifications
You must be signed in to change notification settings - Fork 48
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
Implicit block overhaul #127
Comments
Closed
To compensate the loss of
The pipe operator can be |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current rule for generating implicit block is too complicated to explain in a few sentences.
For example the following:
doesn't parse, because the first
then
generates DEDENT beforeelse
.You pretty much have to read through
addImplicitIndentations
to grok the rule.So here's a proposal to make it simpler:
then
->
etc.) if the next token isn't NEWLINE or INDENT.else
catch
etc.) if the last INDENT is implicit.E.g.:
Pros
Simpler, grokkable rule.
Cons
Incompatibility. Some code currently valid like
will be invalid.
The text was updated successfully, but these errors were encountered: