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

Parse newline before clsoing paren of pseudo method call #8320

Merged

Conversation

makenowjust
Copy link
Contributor

Fixed #8318

Note that this fix does not need to modify formatter because all pseudo methods are formatted as if these methods are usual Call.

Fixed crystal-lang#8318

Note that this fix does not need to modify formatter because all pseudo
methods are formatted as if these methods are usual call.
@@ -4914,6 +4914,9 @@ module Crystal
exps << parse_op_assign
if @token.type == :","
next_token_skip_space_or_newline
else
skip_space_or_newline
check :")"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe this fix seems funny. But these lines are derived from usual arguments parsing (here)

Copy link
Member

@asterite asterite left a comment

Choose a reason for hiding this comment

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

Perfect, thank you!

@asterite asterite added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser labels Oct 13, 2019
@asterite asterite added this to the 0.32.0 milestone Oct 13, 2019
@asterite asterite merged commit 7a52f19 into crystal-lang:master Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-line as, as?, is_a?, and other special methods cause syntax error
3 participants