Skip to content

Commit

Permalink
feat: Add syntax highlighting for pattern constraints (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
ospencer committed May 10, 2021
1 parent cc3d4e3 commit ecbb40d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion editor-extensions/vscode/syntaxes/grain.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
}
},
{
"match": "(:)\\s*(\\w+(<.*>)?)",
"match": "(:)\\s*(\\w+(<.*?>)?)",
"captures": {
"1": { "name": "keyword.operator.grain" },
"2": { "patterns": [{ "include": "#type" }] }
Expand Down Expand Up @@ -1053,6 +1053,9 @@
},
"type-destructor": {
"patterns": [
{
"include": "#type-annotations"
},
{
"begin": "\\b([A-Z]\\w*)\\b(?=\\s*\\()",
"end": "(?<=\\))",
Expand Down

0 comments on commit ecbb40d

Please sign in to comment.