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

Differentiate between function/method calls with and without parentheses #156

Merged
merged 2 commits into from Oct 16, 2017

Conversation

Projects
None yet
2 participants
@50Wliu
Member

50Wliu commented Oct 16, 2017

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Separate function/method call matching into two categories: calls with parentheses and calls without. This prevents the grammar from starting an argument list without parentheses but then ending it with a parenthesis. This can happen, for example, when the function call is wrapped in parentheses like so: (eat food).

Alternate Designs

None.

Benefits

Argument list tokenization is now consistent: no more potential for mixed parentheses matching.

Possible Drawbacks

None.

Applicable Issues

Fixes #153
Fixes #154
Fixes #155

/cc @nathancarter: Thanks so much for the detailed issues that you created. They really helped me track down the cause of the issue, even if they weren't directly litcoffee-related. You were right that they have the same root cause :).

50Wliu added some commits Oct 16, 2017

Differentiate between function/method calls with and without parentheses
If a function/method call's arguments list starts without parentheses,
do not attempt to end the arguments list when a closing parenthesis is
encountered

@50Wliu 50Wliu merged commit 8873cbc into master Oct 16, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@50Wliu 50Wliu deleted the wl-argument-parentheses branch Oct 16, 2017

@nathancarter

This comment has been minimized.

Show comment
Hide comment
@nathancarter

nathancarter Oct 17, 2017

Awesome, thank you!

nathancarter commented Oct 17, 2017

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment