Skip to content

Commit 96ccdc0

Browse files
committed
Add support for optional labels with break and continue keywords
1 parent 1d73ef5 commit 96ccdc0

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

syntaxes/usecode.tmLanguage.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,16 @@
203203
"name": "keyword.other.user_choice.usecode",
204204
"match": "\\buser_choice\\b"
205205
},
206+
{
207+
"match": "(\\b(?:break|continue)\\b)(?:\\s+([A-Za-z_][A-Za-z0-9_]*))?",
208+
"captures": {
209+
"1": { "name": "keyword.control.flow.usecode" },
210+
"2": { "name": "entity.name.label.usecode" }
211+
}
212+
},
206213
{
207214
"name": "keyword.control.flow.usecode",
208-
"match": "\\b(?:if|else|return|do|while|for|nobreak|switch|converse|case|always|break|default|fallthrough|try|catch|throw|abort|forever|breakable)\\b"
215+
"match": "\\b(?:if|else|return|do|while|for|nobreak|switch|converse|case|always|default|fallthrough|try|catch|throw|abort|forever|breakable)\\b"
209216
},
210217
{
211218
"name": "storage.type.usecode",

0 commit comments

Comments
 (0)