slackhq / vscode-hack

Hack language & HHVM debugger support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=pranayagarwal.vscode-hack
MIT License
76 stars 38 forks source link

[Syntax highlighting] Error in endCaptures pattern in type-annotation in v2.7.0 #76

Closed lildude closed 5 years ago

lildude commented 5 years ago

👋 I'm the lead maintainer of https://github.com/github/linguist which uses this grammar for syntax highlighting of Hack files on GitHub.com.

I'm in the process of making a new release and our grammar compiler has detected an error in your grammar that was introduced in https://github.com/slackhq/vscode-hack/pull/72:

'Repository[type-annotation].Patterns[3].EndCaptures[1]' expected a map, got 'string'

The error is because the first, and only, endCaptures in the fourth pattern of type-annotation is a string:

          "endCaptures": {
            "1": "keyword.operator.key.php"
          },

It should be a map, ie:

          "endCaptures": {
            "1": {
              "name": "keyword.operator.key.php"
            }
          },

PR coming up.