Skip to content

Commit 6e2b7dd

Browse files
committed
Update cpp and objective c grammars
1 parent 36e5f75 commit 6e2b7dd

File tree

8 files changed

+407
-184
lines changed

8 files changed

+407
-184
lines changed

extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json

Lines changed: 4 additions & 1 deletion
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/f074a48ae0b7ba313af3faf3d8bfda8537864bd1",
7+
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/cb4565d3ac2e04138effb732b1217650636eb1de",
88
"name": "C++",
99
"scopeName": "source.cpp.embedded.macro",
1010
"patterns": [
@@ -4234,6 +4234,9 @@
42344234
{
42354235
"include": "#ever_present_context"
42364236
},
4237+
{
4238+
"include": "#string_context"
4239+
},
42374240
{
42384241
"include": "#parameter"
42394242
},

extensions/cpp/syntaxes/cpp.tmLanguage.json

Lines changed: 5 additions & 2 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/f074a48ae0b7ba313af3faf3d8bfda8537864bd1",
7+
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/cb4565d3ac2e04138effb732b1217650636eb1de",
88
"name": "C++",
99
"scopeName": "source.cpp",
1010
"patterns": [
@@ -2179,7 +2179,7 @@
21792179
]
21802180
},
21812181
"control_flow_keywords": {
2182-
"match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?<!\\w)(?:(?:co_return)|(?:co_yield)|(?:co_await)|(?:continue)|(?:default)|(?:return)|(?:switch)|(?:catch)|(?:while)|(?:throw)|(?:break)|(?:else)|(?:case)|(?:goto)|(?:for)|(?:try)|(?:if)|(?:do))(?!\\w))",
2182+
"match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?<!\\w)(?:(?:co_return)|(?:co_yield)|(?:co_await)|(?:continue)|(?:default)|(?:switch)|(?:return)|(?:catch)|(?:while)|(?:throw)|(?:break)|(?:case)|(?:goto)|(?:else)|(?:for)|(?:try)|(?:if)|(?:do))(?!\\w))",
21832183
"captures": {
21842184
"1": {
21852185
"patterns": [
@@ -5398,6 +5398,9 @@
53985398
{
53995399
"include": "#ever_present_context"
54005400
},
5401+
{
5402+
"include": "#string_context"
5403+
},
54015404
{
54025405
"include": "#parameter"
54035406
},

extensions/objective-c/build/update-grammars.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
var updateGrammar = require('vscode-grammar-updater');
88

9-
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/objc.tmLanguage.json', './syntaxes/objective-c.tmLanguage.json', undefined, 'master', 'source/languages/cpp');
10-
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/objcpp.tmLanguage.json', './syntaxes/objective-c++.tmLanguage.json', undefined, 'master', 'source/languages/cpp');
9+
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/objc.tmLanguage.json', './syntaxes/objective-c.tmLanguage.json', undefined, 'master', 'source/languages/cpp');
10+
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/objcpp.tmLanguage.json', './syntaxes/objective-c++.tmLanguage.json', undefined, 'master', 'source/languages/cpp');
1111

extensions/objective-c/cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"git": {
77
"name": "jeff-hykin/cpp-textmate-grammar",
88
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
9-
"commitHash": "bc7dedd28eebe52b374744d3fb34d77ff441569e"
9+
"commitHash": "11b4b4e2abf581d0f3c6c90ac6632d1b2f974c67"
1010
}
1111
},
1212
"license": "MIT",
@@ -15,4 +15,4 @@
1515
}
1616
],
1717
"version": 1
18-
}
18+
}

extensions/objective-c/syntaxes/objective-c++.tmLanguage.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"information_for_contributors": [
3-
"This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master//syntaxes/objcpp.tmLanguage.json",
3+
"This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master/syntaxes/objcpp.tmLanguage.json",
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/bc7dedd28eebe52b374744d3fb34d77ff441569e",
7+
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/11b4b4e2abf581d0f3c6c90ac6632d1b2f974c67",
88
"name": "Objective-C++",
99
"scopeName": "source.objcpp",
1010
"patterns": [
@@ -286,10 +286,10 @@
286286
"name": "support.constant.cocoa.objcpp"
287287
},
288288
{
289-
"include": "#c_lang"
289+
"include": "#bracketed_content"
290290
},
291291
{
292-
"include": "#bracketed_content"
292+
"include": "#c_lang"
293293
}
294294
],
295295
"repository": {
@@ -502,7 +502,11 @@
502502
"name": "keyword.other.typedef.objcpp"
503503
},
504504
{
505-
"match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
505+
"match": "\\bin\\b",
506+
"name": "keyword.other.in.objcpp"
507+
},
508+
{
509+
"match": "\\b(const|extern|register|restrict|static|volatile|inline|__block)\\b",
506510
"name": "storage.modifier.objcpp"
507511
},
508512
{
@@ -530,6 +534,9 @@
530534
{
531535
"include": "#strings"
532536
},
537+
{
538+
"include": "#special_variables"
539+
},
533540
{
534541
"begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+\t# define\n((?<id>[a-zA-Z_$][\\w$]*))\t # macro name\n(?:\n (\\()\n\t(\n\t \\s* \\g<id> \\s*\t\t # first argument\n\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n\t (?:\\.\\.\\.)?\t\t\t# varargs ellipsis?\n\t)\n (\\))\n)?",
535542
"beginCaptures": {
@@ -6613,9 +6620,6 @@
66136620
{
66146621
"include": "#property_directive"
66156622
},
6616-
{
6617-
"include": "#special_variables"
6618-
},
66196623
{
66206624
"include": "#method_super"
66216625
},
@@ -7001,7 +7005,7 @@
70017005
"name": "meta.property-with-attributes.objcpp",
70027006
"patterns": [
70037007
{
7004-
"match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|strong|weak)\\b",
7008+
"match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|atomic|strong|weak|nonnull|nullable|null_resettable|null_unspecified|class|direct)\\b",
70057009
"name": "keyword.other.property.attribute.objcpp"
70067010
}
70077011
]
@@ -7051,7 +7055,7 @@
70517055
]
70527056
},
70537057
"protocol_type_qualifier": {
7054-
"match": "\\b(in|out|inout|oneway|bycopy|byref)\\b",
7058+
"match": "\\b(in|out|inout|oneway|bycopy|byref|nonnull|nullable|_Nonnull|_Nullable|_Null_unspecified)\\b",
70557059
"name": "storage.modifier.protocol.objcpp"
70567060
},
70577061
"special_variables": {
@@ -7095,4 +7099,4 @@
70957099
]
70967100
}
70977101
}
7098-
}
7102+
}

extensions/objective-c/syntaxes/objective-c.tmLanguage.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"information_for_contributors": [
3-
"This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master//syntaxes/objc.tmLanguage.json",
3+
"This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master/syntaxes/objc.tmLanguage.json",
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/bc7dedd28eebe52b374744d3fb34d77ff441569e",
7+
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/11b4b4e2abf581d0f3c6c90ac6632d1b2f974c67",
88
"name": "Objective-C",
99
"scopeName": "source.objc",
1010
"patterns": [
@@ -283,10 +283,10 @@
283283
"name": "support.constant.cocoa.objc"
284284
},
285285
{
286-
"include": "#c_lang"
286+
"include": "#bracketed_content"
287287
},
288288
{
289-
"include": "#bracketed_content"
289+
"include": "#c_lang"
290290
}
291291
],
292292
"repository": {
@@ -499,7 +499,11 @@
499499
"name": "keyword.other.typedef.objc"
500500
},
501501
{
502-
"match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
502+
"match": "\\bin\\b",
503+
"name": "keyword.other.in.objc"
504+
},
505+
{
506+
"match": "\\b(const|extern|register|restrict|static|volatile|inline|__block)\\b",
503507
"name": "storage.modifier.objc"
504508
},
505509
{
@@ -527,6 +531,9 @@
527531
{
528532
"include": "#strings"
529533
},
534+
{
535+
"include": "#special_variables"
536+
},
530537
{
531538
"begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+\t# define\n((?<id>[a-zA-Z_$][\\w$]*))\t # macro name\n(?:\n (\\()\n\t(\n\t \\s* \\g<id> \\s*\t\t # first argument\n\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n\t (?:\\.\\.\\.)?\t\t\t# varargs ellipsis?\n\t)\n (\\))\n)?",
532539
"beginCaptures": {
@@ -3121,9 +3128,6 @@
31213128
{
31223129
"include": "#property_directive"
31233130
},
3124-
{
3125-
"include": "#special_variables"
3126-
},
31273131
{
31283132
"include": "#method_super"
31293133
},
@@ -3509,7 +3513,7 @@
35093513
"name": "meta.property-with-attributes.objc",
35103514
"patterns": [
35113515
{
3512-
"match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|strong|weak)\\b",
3516+
"match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|atomic|strong|weak|nonnull|nullable|null_resettable|null_unspecified|class|direct)\\b",
35133517
"name": "keyword.other.property.attribute.objc"
35143518
}
35153519
]
@@ -3559,7 +3563,7 @@
35593563
]
35603564
},
35613565
"protocol_type_qualifier": {
3562-
"match": "\\b(in|out|inout|oneway|bycopy|byref)\\b",
3566+
"match": "\\b(in|out|inout|oneway|bycopy|byref|nonnull|nullable|_Nonnull|_Nullable|_Null_unspecified)\\b",
35633567
"name": "storage.modifier.protocol.objc"
35643568
},
35653569
"special_variables": {
@@ -3603,4 +3607,4 @@
36033607
]
36043608
}
36053609
}
3606-
}
3610+
}

0 commit comments

Comments
 (0)