Skip to content

Commit 4d37df5

Browse files
committed
Adding enum highlighting in HLSL
1 parent dc10709 commit 4d37df5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

syntaxes/hlsl.tmLanguage.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@
421421
{
422422
"comment": "struct declaration",
423423
"name": "keyword.declaration.struct.hlsl",
424-
"match": "\\b(struct|class|interface|cbuffer|tbuffer)\\s+(\\[[a-z]+\\]\\s+)?([a-zA-Z][a-zA-Z0-9_]*)?(\\s+:\\s+[a-zA-Z][a-zA-Z0-9_]*)?",
424+
"match": "\\b(struct|class|interface|cbuffer|tbuffer|enum class|enum)\\s+(\\[[a-z]+\\]\\s+)?([a-zA-Z][a-zA-Z0-9_]*)?(\\s+:\\s+[a-zA-Z][a-zA-Z0-9_]*)?",
425425
"captures": {
426426
"1": {
427427
"name": "keyword.declaration.struct.hlsl"
@@ -641,7 +641,7 @@
641641
{
642642
"comment": "other keywords",
643643
"name": "keyword.control.hlsl",
644-
"match": "\\b(goto|void|break|typedef|using|case|continue|default|discard|else|export|do|enum|for|function|if|private|return|switch|while|workgroup|operator)\\b"
644+
"match": "\\b(goto|void|break|typedef|using|case|continue|default|discard|else|export|do|for|function|if|private|return|switch|while|workgroup|operator)\\b"
645645
},
646646
{
647647
"comment": "reserved keywords",

0 commit comments

Comments
 (0)