Skip to content

Commit

Permalink
[vscode] "enum*", "throws", "throw Exception".
Browse files Browse the repository at this point in the history
  • Loading branch information
pfusik committed Nov 16, 2023
1 parent a275c35 commit 9ce864d
Showing 1 changed file with 37 additions and 6 deletions.
43 changes: 37 additions & 6 deletions editors/vscode/syntaxes/fusion.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"include": "#comment"
},
{
"match": "(enum)\\s+([A-Z][0-9A-Za-z_]*)",
"match": "(enum)\\s*\\*?\\s+([A-Z][0-9A-Za-z_]*)",
"captures": {
"1": {
"name": "keyword.other.enum.fu"
Expand Down Expand Up @@ -239,8 +239,28 @@
]
},
{
"name": "keyword.other.throws.fu",
"match": "\\bthrows\\b"
"begin": "\\bthrows\\b",
"beginCaptures": {
"0": {
"name": "keyword.other.throws.fu"
}
},
"end": "(?=[{;])",
"patterns": [
{
"include": "#preprocessor"
},
{
"include": "#comment"
},
{
"name": "entity.name.type.class.fu",
"match": "[A-Z][0-9A-Za-z_]*"
},
{
"include": "#punctuation-comma"
}
]
},
{
"include": "#expression-body"
Expand Down Expand Up @@ -685,13 +705,24 @@
}
},
"throw-statement": {
"begin": "\\bthrow\\b",
"begin": "\\b(throw)\\s+([A-Z][0-9A-Za-z_]*)\\s*(\\()",
"beginCaptures": {
"0": {
"1": {
"name": "keyword.control.flow.throw.fu"
},
"2": {
"name": "entity.name.type.class.fu"
},
"3": {
"name": "punctuation.parenthesis.open.fu"
}
},
"end": "\\)?(?=;)",
"endCaptures": {
"0": {
"name": "punctuation.parenthesis.close.fu"
}
},
"end": "(?=;)",
"patterns": [
{
"include": "#expression"
Expand Down

0 comments on commit 9ce864d

Please sign in to comment.