Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 25b8052

Browse files
author
Sergey Zolotarev
committed
Fix C++ synatx highlighting error in macros with extern "C"
1 parent 7a97c96 commit 25b8052

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grammars/c++.cson

+3-3
Original file line numberDiff line numberDiff line change
@@ -337,19 +337,19 @@
337337
]
338338
}
339339
{
340-
'begin': '\\b(extern)(?=\\s*")'
340+
'begin': '\\b(extern)(?=\\s*\"\\w+\"\\b)'
341341
'beginCaptures':
342342
'1':
343343
'name': 'storage.modifier.cpp'
344-
'end': '(?<=\\})|(?=\\w)|(?=\\s*#\\s*endif\\b)'
344+
'end': '(?<=\\})|(?=\\w)|(?=\\s*#\\s*(?:else|elif|endif)\\b)'
345345
'name': 'meta.extern-block.cpp'
346346
'patterns': [
347347
{
348348
'begin': '\\{'
349349
'beginCaptures':
350350
'0':
351351
'name': 'punctuation.section.block.begin.bracket.curly.c'
352-
'end': '\\}|(?=\\s*#\\s*endif\\b)'
352+
'end': '\\}|(?=\\s*#\\s*(?:else|elif|endif)\\b)'
353353
'endCaptures':
354354
'0':
355355
'name': 'punctuation.section.block.end.bracket.curly.c'

0 commit comments

Comments
 (0)