mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
Update C++ grammar to get * fix
There is a known bug for macros, but it is better to get the * fix and pick up the macro fix as soon as it is made.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/9c4f4b3291538d9f5144f02d3b6af877b84f2cb2",
|
||||
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/1a24b4aa383169919f0d92cf2735ac35a3e7db3c",
|
||||
"name": "C",
|
||||
"scopeName": "source.c",
|
||||
"patterns": [
|
||||
@@ -374,16 +374,41 @@
|
||||
"repository": {
|
||||
"default_statement": {
|
||||
"name": "meta.conditional.case.c",
|
||||
"begin": "((?<!\\w)default(?!\\w))",
|
||||
"begin": "((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)default(?!\\w))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#inline_comment"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "comment.block.c punctuation.definition.comment.begin.c"
|
||||
},
|
||||
"3": {
|
||||
"name": "comment.block.c"
|
||||
},
|
||||
"4": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\*\\/",
|
||||
"name": "comment.block.c punctuation.definition.comment.end.c"
|
||||
},
|
||||
{
|
||||
"match": "\\*",
|
||||
"name": "comment.block.c"
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"name": "keyword.control.default.c"
|
||||
}
|
||||
},
|
||||
"end": "(:)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "colon.c punctuation.separator.case.default.c"
|
||||
"name": "punctuation.separator.colon.case.default.c"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
@@ -397,16 +422,41 @@
|
||||
},
|
||||
"case_statement": {
|
||||
"name": "meta.conditional.case.c",
|
||||
"begin": "((?<!\\w)case(?!\\w))",
|
||||
"begin": "((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)case(?!\\w))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#inline_comment"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "comment.block.c punctuation.definition.comment.begin.c"
|
||||
},
|
||||
"3": {
|
||||
"name": "comment.block.c"
|
||||
},
|
||||
"4": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\*\\/",
|
||||
"name": "comment.block.c punctuation.definition.comment.end.c"
|
||||
},
|
||||
{
|
||||
"match": "\\*",
|
||||
"name": "comment.block.c"
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"name": "keyword.control.case.c"
|
||||
}
|
||||
},
|
||||
"end": "(:)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "colon.c punctuation.separator.case.c"
|
||||
"name": "punctuation.separator.colon.case.c"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
@@ -420,12 +470,37 @@
|
||||
},
|
||||
"switch_statement": {
|
||||
"name": "meta.block.switch.c",
|
||||
"begin": "(((?<!\\w)switch(?!\\w)))",
|
||||
"begin": "(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)switch(?!\\w)))",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "meta.head.switch.c"
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#inline_comment"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"name": "comment.block.c punctuation.definition.comment.begin.c"
|
||||
},
|
||||
"4": {
|
||||
"name": "comment.block.c"
|
||||
},
|
||||
"5": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\*\\/",
|
||||
"name": "comment.block.c punctuation.definition.comment.end.c"
|
||||
},
|
||||
{
|
||||
"match": "\\*",
|
||||
"name": "comment.block.c"
|
||||
}
|
||||
]
|
||||
},
|
||||
"6": {
|
||||
"name": "keyword.control.switch.c"
|
||||
}
|
||||
},
|
||||
@@ -487,9 +562,34 @@
|
||||
},
|
||||
"switch_conditional_parentheses": {
|
||||
"name": "meta.conditional.switch.c",
|
||||
"begin": "(\\()",
|
||||
"begin": "((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#inline_comment"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "comment.block.c punctuation.definition.comment.begin.c"
|
||||
},
|
||||
"3": {
|
||||
"name": "comment.block.c"
|
||||
},
|
||||
"4": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\*\\/",
|
||||
"name": "comment.block.c punctuation.definition.comment.end.c"
|
||||
},
|
||||
{
|
||||
"match": "\\*",
|
||||
"name": "comment.block.c"
|
||||
}
|
||||
]
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.section.parens.begin.bracket.round.conditional.switch.c"
|
||||
}
|
||||
},
|
||||
@@ -580,7 +680,7 @@
|
||||
"begin": "(,)\\s*(?=(?:L|u8|u|U\\s*\\\")?)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "comma.c punctuation.separator.delimiter.c"
|
||||
"name": "punctuation.separator.delimiter.comma.c"
|
||||
}
|
||||
},
|
||||
"end": "(?=\\))",
|
||||
|
||||
Reference in New Issue
Block a user