Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Add missing operators to the tree-sitter grammar #612

Merged
merged 1 commit into from Oct 26, 2018

Conversation

Ben3eeE
Copy link
Contributor

@Ben3eeE 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

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.

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants