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

endCaptures in type-annotation should be a map #77

Closed lildude closed 5 years ago

lildude commented 5 years ago

As detailed in https://github.com/slackhq/vscode-hack/issues/76, I'm the lead maintainer of https://github.com/github/linguist which uses this grammar for syntax highlighting of Hack files on GitHub.com.

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"
            }
          },

This PR corrects this.

Fixes https://github.com/slackhq/vscode-hack/issues/76

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

PranayAgarwal commented 5 years ago

Thanks for the fix @lildude! @tspence could you take a quick look as well if you get the chance?

azjezz commented 5 years ago

@PranayAgarwal this was fixed before in #54, the issue was re-introduced by #72

tspence commented 5 years ago

Thanks for the fix!