Skip to content

Commit dc90cfb

Browse files
authored
Revert "Update grammars" (microsoft#92790)
This partially reverts commit efa12b2.
1 parent bf95969 commit dc90cfb

File tree

11 files changed

+15531
-15094
lines changed

11 files changed

+15531
-15094
lines changed

extensions/cpp/cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"git": {
77
"name": "jeff-hykin/cpp-textmate-grammar",
88
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
9-
"commitHash": "5b6f67859e895da83dc242b849480ee04ce7ce38"
9+
"commitHash": "666808cab3907fc91ed4d3901060ee6b045cca58"
1010
}
1111
},
1212
"license": "MIT",
13-
"version": "1.14.20",
13+
"version": "1.14.15",
1414
"description": "The files syntaxes/c.json and syntaxes/c++.json were derived from https://github.com/atom/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
1515
},
1616
{

extensions/cpp/syntaxes/c.tmLanguage.json

Lines changed: 60 additions & 208 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/85b9008b406cc9d3b1c9e779e94cc071116c8426",
7+
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/72b309aabb63bf14a3cdf0280149121db005d616",
88
"name": "C",
99
"scopeName": "source.c",
1010
"patterns": [
@@ -464,7 +464,7 @@
464464
]
465465
},
466466
"backslash_escapes": {
467-
"match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3][0-7]{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )",
467+
"match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )",
468468
"name": "constant.character.escape.c"
469469
},
470470
"block": {
@@ -690,20 +690,12 @@
690690
"name": "storage.type.class.doxygen.c"
691691
},
692692
{
693-
"match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)\\])?\\s+(\\b\\w+\\b)",
693+
"match": "((?<=[\\s*!\\/])[\\\\@]param)\\s+(\\b\\w+\\b)",
694694
"captures": {
695695
"1": {
696696
"name": "storage.type.class.doxygen.c"
697697
},
698698
"2": {
699-
"patterns": [
700-
{
701-
"match": "in|out",
702-
"name": "keyword.other.parameter.direction.$0.c"
703-
}
704-
]
705-
},
706-
"3": {
707699
"name": "variable.parameter.c"
708700
}
709701
}
@@ -776,20 +768,12 @@
776768
"name": "storage.type.class.doxygen.c"
777769
},
778770
{
779-
"match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)\\])?\\s+(\\b\\w+\\b)",
771+
"match": "((?<=[\\s*!\\/])[\\\\@]param)\\s+(\\b\\w+\\b)",
780772
"captures": {
781773
"1": {
782774
"name": "storage.type.class.doxygen.c"
783775
},
784776
"2": {
785-
"patterns": [
786-
{
787-
"match": "in|out",
788-
"name": "keyword.other.parameter.direction.$0.c"
789-
}
790-
]
791-
},
792-
"3": {
793777
"name": "variable.parameter.c"
794778
}
795779
}
@@ -875,20 +859,12 @@
875859
"name": "storage.type.class.doxygen.c"
876860
},
877861
{
878-
"match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)\\])?\\s+(\\b\\w+\\b)",
862+
"match": "((?<=[\\s*!\\/])[\\\\@]param)\\s+(\\b\\w+\\b)",
879863
"captures": {
880864
"1": {
881865
"name": "storage.type.class.doxygen.c"
882866
},
883867
"2": {
884-
"patterns": [
885-
{
886-
"match": "in|out",
887-
"name": "keyword.other.parameter.direction.$0.c"
888-
}
889-
]
890-
},
891-
"3": {
892868
"name": "variable.parameter.c"
893869
}
894870
}
@@ -2898,219 +2874,95 @@
28982874
},
28992875
{
29002876
"name": "meta.asm.c",
2901-
"begin": "(\\b(?:__asm__|asm)\\b)\\s*((?:volatile)?)",
2877+
"begin": "(\\b(?:__asm__|asm)\\b)\\s*((?:volatile)?)\\s*(\\()",
29022878
"beginCaptures": {
29032879
"1": {
29042880
"name": "storage.type.asm.c"
29052881
},
29062882
"2": {
29072883
"name": "storage.modifier.c"
2884+
},
2885+
"3": {
2886+
"name": "punctuation.section.parens.begin.bracket.round.assembly.c"
2887+
}
2888+
},
2889+
"end": "(\\))",
2890+
"endCaptures": {
2891+
"1": {
2892+
"name": "punctuation.section.parens.end.bracket.round.assembly.c"
29082893
}
29092894
},
2910-
"end": "(?!\\G)",
29112895
"patterns": [
29122896
{
2913-
"match": "(?:^)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\n|$)",
2914-
"captures": {
2915-
"1": {
2916-
"patterns": [
2917-
{
2918-
"include": "#inline_comment"
2919-
}
2920-
]
2921-
},
2922-
"2": {
2923-
"name": "comment.block.c punctuation.definition.comment.begin.c"
2924-
},
2925-
"3": {
2926-
"name": "comment.block.c"
2927-
},
2928-
"4": {
2929-
"patterns": [
2930-
{
2931-
"match": "\\*\\/",
2932-
"name": "comment.block.c punctuation.definition.comment.end.c"
2933-
},
2934-
{
2935-
"match": "\\*",
2936-
"name": "comment.block.c"
2937-
}
2938-
]
2939-
}
2940-
}
2941-
},
2942-
{
2943-
"include": "#comments_context"
2944-
},
2945-
{
2946-
"include": "#comments"
2947-
},
2948-
{
2949-
"begin": "(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\()",
2897+
"name": "string.quoted.double.c",
2898+
"contentName": "meta.embedded.assembly.c",
2899+
"begin": "(R?)(\")",
29502900
"beginCaptures": {
29512901
"1": {
2952-
"name": "punctuation.section.parens.begin.bracket.round.assembly.c"
2902+
"name": "meta.encoding.c"
29532903
},
29542904
"2": {
2955-
"patterns": [
2956-
{
2957-
"include": "#inline_comment"
2958-
}
2959-
]
2960-
},
2961-
"3": {
2962-
"name": "comment.block.c punctuation.definition.comment.begin.c"
2963-
},
2964-
"4": {
2965-
"name": "comment.block.c"
2966-
},
2967-
"5": {
2968-
"patterns": [
2969-
{
2970-
"match": "\\*\\/",
2971-
"name": "comment.block.c punctuation.definition.comment.end.c"
2972-
},
2973-
{
2974-
"match": "\\*",
2975-
"name": "comment.block.c"
2976-
}
2977-
]
2905+
"name": "punctuation.definition.string.begin.assembly.c"
29782906
}
29792907
},
2980-
"end": "(\\))",
2908+
"end": "(\")",
29812909
"endCaptures": {
29822910
"1": {
2983-
"name": "punctuation.section.parens.end.bracket.round.assembly.c"
2911+
"name": "punctuation.definition.string.end.assembly.c"
29842912
}
29852913
},
29862914
"patterns": [
29872915
{
2988-
"name": "string.quoted.double.c",
2989-
"contentName": "meta.embedded.assembly.c",
2990-
"begin": "(R?)(\")",
2991-
"beginCaptures": {
2992-
"1": {
2993-
"name": "meta.encoding.c"
2994-
},
2995-
"2": {
2996-
"name": "punctuation.definition.string.begin.assembly.c"
2997-
}
2998-
},
2999-
"end": "(\")",
3000-
"endCaptures": {
3001-
"1": {
3002-
"name": "punctuation.definition.string.end.assembly.c"
3003-
}
3004-
},
3005-
"patterns": [
3006-
{
3007-
"include": "source.asm"
3008-
},
3009-
{
3010-
"include": "source.x86"
3011-
},
3012-
{
3013-
"include": "source.x86_64"
3014-
},
3015-
{
3016-
"include": "source.arm"
3017-
},
3018-
{
3019-
"include": "#backslash_escapes"
3020-
},
3021-
{
3022-
"include": "#string_escaped_char"
3023-
}
3024-
]
2916+
"include": "source.asm"
30252917
},
30262918
{
3027-
"begin": "(\\()",
3028-
"beginCaptures": {
3029-
"1": {
3030-
"name": "punctuation.section.parens.begin.bracket.round.assembly.inner.c"
3031-
}
3032-
},
3033-
"end": "(\\))",
3034-
"endCaptures": {
3035-
"1": {
3036-
"name": "punctuation.section.parens.end.bracket.round.assembly.inner.c"
3037-
}
3038-
},
3039-
"patterns": [
3040-
{
3041-
"include": "#evaluation_context"
3042-
}
3043-
]
2919+
"include": "source.x86"
30442920
},
30452921
{
3046-
"match": "\\[((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))([a-zA-Z_]\\w*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]",
3047-
"captures": {
3048-
"1": {
3049-
"patterns": [
3050-
{
3051-
"include": "#inline_comment"
3052-
}
3053-
]
3054-
},
3055-
"2": {
3056-
"name": "comment.block.c punctuation.definition.comment.begin.c"
3057-
},
3058-
"3": {
3059-
"name": "comment.block.c"
3060-
},
3061-
"4": {
3062-
"patterns": [
3063-
{
3064-
"match": "\\*\\/",
3065-
"name": "comment.block.c punctuation.definition.comment.end.c"
3066-
},
3067-
{
3068-
"match": "\\*",
3069-
"name": "comment.block.c"
3070-
}
3071-
]
3072-
},
3073-
"5": {
3074-
"name": "variable.other.asm.label.c"
3075-
},
3076-
"6": {
3077-
"patterns": [
3078-
{
3079-
"include": "#inline_comment"
3080-
}
3081-
]
3082-
},
3083-
"7": {
3084-
"name": "comment.block.c punctuation.definition.comment.begin.c"
3085-
},
3086-
"8": {
3087-
"name": "comment.block.c"
3088-
},
3089-
"9": {
3090-
"patterns": [
3091-
{
3092-
"match": "\\*\\/",
3093-
"name": "comment.block.c punctuation.definition.comment.end.c"
3094-
},
3095-
{
3096-
"match": "\\*",
3097-
"name": "comment.block.c"
3098-
}
3099-
]
3100-
}
3101-
}
2922+
"include": "source.x86_64"
2923+
},
2924+
{
2925+
"include": "source.arm"
31022926
},
31032927
{
3104-
"match": ":",
3105-
"name": "punctuation.separator.delimiter.colon.assembly.c"
2928+
"include": "#backslash_escapes"
31062929
},
31072930
{
3108-
"include": "#comments_context"
2931+
"include": "#string_escaped_char"
31092932
},
31102933
{
3111-
"include": "#comments"
2934+
"match": "(?=not)possible"
31122935
}
31132936
]
2937+
},
2938+
{
2939+
"begin": "(\\()",
2940+
"beginCaptures": {
2941+
"1": {
2942+
"name": "punctuation.section.parens.begin.bracket.round.assembly.inner.c"
2943+
}
2944+
},
2945+
"end": "(\\))",
2946+
"endCaptures": {
2947+
"1": {
2948+
"name": "punctuation.section.parens.end.bracket.round.assembly.inner.c"
2949+
}
2950+
},
2951+
"patterns": [
2952+
{
2953+
"include": "#evaluation_context"
2954+
}
2955+
]
2956+
},
2957+
{
2958+
"match": ":",
2959+
"name": "punctuation.separator.delimiter.colon.assembly.c"
2960+
},
2961+
{
2962+
"include": "#comments_context"
2963+
},
2964+
{
2965+
"include": "#comments"
31142966
}
31152967
]
31162968
}

0 commit comments

Comments
 (0)