Sublime Forum

Help With Sublime Syntax Highlighting

#1

I have been writing a syntax highlighter for my language. I want to be able to highlight functions and calls a different colors. I’ve tried

    - match: '{{id}}[\s]*\('
      push: function
  function:
    - meta_scope: entity.name.function
      pop: true

…but this doesn’t work?

Am I getting the regex wrong or do I need to move this match up and down main?

0 Likes

#2

You can only pop on a match pattern (it can be empty)
Typically, capture groups are used for scenarios like this, to scope the function name without the whitespace separately from the parens

0 Likes