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

Fix SyntaxErrors in compound expressions #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix SyntaxErrors in compound expressions #9

wants to merge 1 commit into from

Conversation

mehwar
Copy link

@mehwar mehwar commented Dec 1, 2015

The additional parentheses eliminate SyntaxErrors similar to Appendix A that surface when running the default React Native iOS app with Node v5.1.

Appendix A
iOS simulator SyntaxError screenshot

The additional parentheses eliminate SyntaxErrors similar to Appendix A that surface when running the default React Native iOS app with Node v5.1.

Appendix A
![iOS simulator SyntaxError screenshot](http://i.snag.gy/po7Fi.jpg "SyntaxError")
@sophiebits
Copy link

Your added parens change the meaning of the code. I am fairly sure that the code is valid JS as-is – perhaps you can look at the transformed source to see what happened to it?

@mehwar
Copy link
Author

mehwar commented Dec 1, 2015

Good catch... I'll do some more digging on what's actually going on.

Aside: I tried changing the parens in a way to keep code meaning constant (put it around on the other side to wrap the multiplication operator) and I seem to run into the same SyntaxError as noted in Appendix A :/.

@sophiebits
Copy link

What is Appendix A, sorry?

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.

3 participants