Skip to content

Conversation

resolritter
Copy link
Contributor

@resolritter resolritter commented Nov 25, 2020

closes #107

Code changes are ready. The PR is currently marked as "Draft" because it requires changes in tree-sitter-javascript (tree-sitter/tree-sitter-javascript#146).

@maxbrunsfeld
Copy link
Contributor

Thanks for the fix! I left a question about tree-sitter/tree-sitter-javascript#146. Let's resolve that before merging this one.

resolritter added a commit to resolritter/tree-sitter-javascript that referenced this pull request Dec 2, 2020
@resolritter resolritter force-pushed the non_null_assertion_assignment branch 2 times, most recently from fd7ec0e to e68a521 Compare December 2, 2020 10:25
maxbrunsfeld pushed a commit to tree-sitter/tree-sitter-javascript that referenced this pull request Dec 2, 2020
* designate special group for LHS of augmented assignment expression

needed for tree-sitter/tree-sitter-typescript#119

* regenerate parser for '_augmented_assignment_lhs'

Co-authored-by: resolritter <[email protected]>
Copy link
Contributor

@maxbrunsfeld maxbrunsfeld left a comment

Choose a reason for hiding this comment

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

This looks good; I just left one grammar style suggestion.

)),

_augmented_assignment_lhs: ($, previous) => choice(...previous.members.concat([$.non_null_expression])),
_lhs_expression: ($, previous) => choice(...previous.members.concat([$.non_null_expression])),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think both of these could be written choice(previous, $.non_null_expression). The nesting of choices doesn't matter, so there's no need to 'flatten' it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggestion taken

@resolritter resolritter force-pushed the non_null_assertion_assignment branch from e68a521 to e33f458 Compare December 3, 2020 17:50
@maxbrunsfeld maxbrunsfeld marked this pull request as ready for review December 3, 2020 17:54
@maxbrunsfeld maxbrunsfeld merged commit ada1521 into tree-sitter:master Dec 3, 2020
@maxbrunsfeld
Copy link
Contributor

Thanks!

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.

Support non-null assertion operator after array dereference
2 participants