Skip to content

Commit

Permalink
feat: Exception highlighting (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
ospencer committed Mar 2, 2024
1 parent 13f5269 commit 59ccb76
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion editor-extensions/vscode/syntaxes/grain.json
Expand Up @@ -430,6 +430,13 @@
}
]
},
{
"match": "\\b(exception)\\b\\s+(.*)",
"captures": {
"1": { "patterns": [{ "include": "#keywords" }] },
"2": { "patterns": [{ "include": "#type-variant" }] }
}
},
{
"match": "(type|record|enum)\\s+([A-Z]\\w*)(<.*>)?",
"captures": {
Expand Down Expand Up @@ -1077,7 +1084,7 @@
"keywords": {
"patterns": [
{
"match": "\\b(throw|while|for|continue|break|return|match|when|pattern|assert|fail|import|export|from|include|use|provide|abstract|except|as)\\b",
"match": "\\b(throw|exception|while|for|continue|break|return|match|when|pattern|assert|fail|import|export|from|include|use|provide|abstract|except|as)\\b",
"name": "keyword.control.grain"
},
{
Expand Down

0 comments on commit 59ccb76

Please sign in to comment.