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

Distinguishing from comparison operators #188

@smaili

Description

@smaili

I've noticed that these two rules use the same grouping:

  {
    'match': '(?<!\\.)\\b(delete|in|of|instanceof|new|typeof|void)(?!\\s*:)\\b'
    'name': 'keyword.operator.js'
  }
  {
    'match': '!=|!==|<=|>=|<<=|>>=|>>>=|\\*=|(?<!\\()/=|%=|\\+=|\\-=|&=|\\^=|!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\^'
    'comment': 'match 2-character operator first'
    'name': 'keyword.operator.js'
  }

By using the same groups for both, we can't have syntax highlighting be applied to keywords like delete and typeof. What would be the best way to distinguish these? Maybe remove the keyword class from the second group of operators?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions