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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing operators to the tree-sitter grammar #612

Merged
merged 1 commit into from Oct 26, 2018

Conversation

Projects
None yet
2 participants
@Ben3eeE
Member

Ben3eeE commented Oct 26, 2018

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

Sync up operators with the textmate grammar. It's possible I missed some 馃槄 I didn't add ** or **= because they are not parsed by tree-sitter. They are also experimental according to MDN.

Textmate (one-dark-ui)
image

Tree-sitter (Before this PR)
image

Tree-sitter (With this PR)
image

Alternate Designs

N/A

Benefits

All operators are styled the same

Possible Drawbacks

  • Some people like the inconsistent highlighting of operators that tree-sitter introduced
  • It looks like ** and **= is styled correctly because styling is captured by each of the parts. But tree-sitter parses it with ERROR

Applicable Issues

N/A

@Ben3eeE Ben3eeE requested a review from maxbrunsfeld Oct 26, 2018

@maxbrunsfeld

Looks great! 馃殺

Also, would you be up for adding these to the Flow and TypeScript grammar files in language-typescript. I know it's a bit duplicative... maybe we could add some mechanism for sharing these scope mappings at some point.

@Ben3eeE Ben3eeE merged commit ff1ac77 into master Oct 26, 2018

2 checks passed

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

@Ben3eeE Ben3eeE deleted the b3-missing-operators branch Oct 26, 2018

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