atom / language-coffee-script

CoffeeScript support in Atom
Other
59 stars 56 forks source link

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

Closed winstliu closed 7 years ago

winstliu commented 7 years ago

Requirements

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 :).

nathancarter commented 7 years ago

Awesome, thank you!