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

Disallow '!' or '?' at the end of the LHS in an assignment #7582

Merged

Conversation

@Maroo-b
Copy link
Contributor

commented Mar 24, 2019

Issue: #6685
This affects mainly variable defined in the top level, instance and class variable raise already an exception.

I'm curious how do you guys debug the compiler, I'm still new here and I was just adding puts statement for debugging, is there any trick to know that could make me or someone else more productive in the future?

@asterite

This comment has been minimized.

Copy link
Member

commented Mar 24, 2019

We debug with puts like you

@j8r

This comment has been minimized.

Copy link
Contributor

commented Mar 24, 2019

@Maroo-b there is also the @bcardiff's puts: pp!({x, x.class, typeof(x)})
One can have:

def pp_bcardiff(x)
  pp!({x, x.class, typeof(x)}
end

Profit 😄

@Maroo-b Maroo-b force-pushed the Maroo-b:6685_disallow_question_mark branch from 88f5b56 to ce8e1f8 Mar 24, 2019

@Maroo-b

This comment has been minimized.

Copy link
Contributor Author

commented Mar 24, 2019

@j8r I was actually searching for this method in the code source 😄 . Maybe we should add it for internal use only

src/compiler/crystal/syntax/parser.cr Outdated Show resolved Hide resolved
@Maroo-b

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2019

Thank you @straight-shoota for the review, I updated the PR as suggested.

@@ -315,7 +315,6 @@ module Crystal
break
when :"="
slash_is_regex!

This comment has been minimized.

Copy link
@Sija

Sija Apr 2, 2019

Contributor

Pedantic: That line could be left as is :)

This comment has been minimized.

Copy link
@Maroo-b

Maroo-b Apr 2, 2019

Author Contributor

@Sija Done :)

@Maroo-b Maroo-b force-pushed the Maroo-b:6685_disallow_question_mark branch from 9a34b61 to 823b176 Apr 2, 2019

Maroo-b and others added some commits Mar 24, 2019

Disallow '!' or '?' at the end of the LHS in an assignment
Issue: #6685
This affects mainly variable defined in top level, instance and class variable raise already an exception.
Update src/compiler/crystal/syntax/parser.cr
Co-Authored-By: Maroo-b <marouen.it.technology@gmail.com>

@Maroo-b Maroo-b force-pushed the Maroo-b:6685_disallow_question_mark branch from 823b176 to fb8a5c1 Apr 6, 2019

Disallow '!' or '?' at the end of the LHS in an assignment
Issue: #6685
This affects mainly variable defined in top level, instance and class variable raise already an exception.

@Maroo-b Maroo-b force-pushed the Maroo-b:6685_disallow_question_mark branch from fb8a5c1 to cf60be8 Apr 13, 2019

@sdogruyol
Copy link
Member

left a comment

Thank you @Maroo-b

@straight-shoota straight-shoota merged commit 397bfe6 into crystal-lang:master Jun 3, 2019

5 checks passed

ci/circleci: check_format Your tests passed on CircleCI!
Details
ci/circleci: test_darwin Your tests passed on CircleCI!
Details
ci/circleci: test_linux Your tests passed on CircleCI!
Details
ci/circleci: test_linux32 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@straight-shoota straight-shoota added this to the 0.29.0 milestone Jun 3, 2019

@Maroo-b Maroo-b deleted the Maroo-b:6685_disallow_question_mark branch Jun 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.