Skip to content

Commit 49f3884

Browse files
committed
Pull request sublimehq#1831 and fixes for enum in header files works
1 parent 36561ed commit 49f3884

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

C++/C++.sublime-syntax

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,13 @@ contexts:
329329
- include: scope:source.c#label
330330
- include: expressions
331331

332+
statements-enum:
333+
- include: preprocessor-statements
334+
- include: scope:source.c#label
335+
- match: '{{identifier}}'
336+
scope: entity.name.enum.c++.constants
337+
- include: expressions
338+
332339
expressions:
333340
- include: early-expressions
334341
- include: late-expressions
@@ -851,6 +858,10 @@ contexts:
851858
push: data-structures
852859
- include: expressions-minus-generic-type
853860

861+
- match: \benum\b
862+
scope: storage.type.c++
863+
set: data-structures-enum-definition
864+
854865
parens:
855866
- match: \(
856867
scope: punctuation.section.group.begin.c++
@@ -1268,7 +1279,7 @@ contexts:
12681279
- match: '\}'
12691280
scope: meta.enum.c++ meta.block.c++ punctuation.section.block.end.c++
12701281
pop: true
1271-
- include: statements
1282+
- include: statements-enum
12721283

12731284
data-structures-union-definition:
12741285
- meta_scope: meta.union.c++

0 commit comments

Comments
 (0)