Update cpp and objective c grammars

This commit is contained in:
Alex Ross 2021-07-13 11:43:19 +02:00
parent 36e5f758d2
commit 6e2b7dda7a
No known key found for this signature in database
GPG key ID: 89DDDBA66CBA7840
8 changed files with 421 additions and 198 deletions

View file

@ -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/f074a48ae0b7ba313af3faf3d8bfda8537864bd1",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/cb4565d3ac2e04138effb732b1217650636eb1de",
"name": "C++",
"scopeName": "source.cpp.embedded.macro",
"patterns": [
@ -4234,6 +4234,9 @@
{
"include": "#ever_present_context"
},
{
"include": "#string_context"
},
{
"include": "#parameter"
},

View file

@ -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/f074a48ae0b7ba313af3faf3d8bfda8537864bd1",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/cb4565d3ac2e04138effb732b1217650636eb1de",
"name": "C++",
"scopeName": "source.cpp",
"patterns": [
@ -2179,7 +2179,7 @@
]
},
"control_flow_keywords": {
"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))",
"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))",
"captures": {
"1": {
"patterns": [
@ -5398,6 +5398,9 @@
{
"include": "#ever_present_context"
},
{
"include": "#string_context"
},
{
"include": "#parameter"
},

View file

@ -6,6 +6,6 @@
var updateGrammar = require('vscode-grammar-updater');
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/objc.tmLanguage.json', './syntaxes/objective-c.tmLanguage.json', undefined, 'master', 'source/languages/cpp');
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', '/syntaxes/objcpp.tmLanguage.json', './syntaxes/objective-c++.tmLanguage.json', undefined, 'master', 'source/languages/cpp');
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/objc.tmLanguage.json', './syntaxes/objective-c.tmLanguage.json', undefined, 'master', 'source/languages/cpp');
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/objcpp.tmLanguage.json', './syntaxes/objective-c++.tmLanguage.json', undefined, 'master', 'source/languages/cpp');

View file

@ -6,7 +6,7 @@
"git": {
"name": "jeff-hykin/cpp-textmate-grammar",
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
"commitHash": "bc7dedd28eebe52b374744d3fb34d77ff441569e"
"commitHash": "11b4b4e2abf581d0f3c6c90ac6632d1b2f974c67"
}
},
"license": "MIT",
@ -15,4 +15,4 @@
}
],
"version": 1
}
}

View file

@ -1,10 +1,10 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master//syntaxes/objcpp.tmLanguage.json",
"This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master/syntaxes/objcpp.tmLanguage.json",
"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/bc7dedd28eebe52b374744d3fb34d77ff441569e",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/11b4b4e2abf581d0f3c6c90ac6632d1b2f974c67",
"name": "Objective-C++",
"scopeName": "source.objcpp",
"patterns": [
@ -286,10 +286,10 @@
"name": "support.constant.cocoa.objcpp"
},
{
"include": "#c_lang"
"include": "#bracketed_content"
},
{
"include": "#bracketed_content"
"include": "#c_lang"
}
],
"repository": {
@ -502,7 +502,11 @@
"name": "keyword.other.typedef.objcpp"
},
{
"match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
"match": "\\bin\\b",
"name": "keyword.other.in.objcpp"
},
{
"match": "\\b(const|extern|register|restrict|static|volatile|inline|__block)\\b",
"name": "storage.modifier.objcpp"
},
{
@ -530,6 +534,9 @@
{
"include": "#strings"
},
{
"include": "#special_variables"
},
{
"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)?",
"beginCaptures": {
@ -6613,9 +6620,6 @@
{
"include": "#property_directive"
},
{
"include": "#special_variables"
},
{
"include": "#method_super"
},
@ -7001,7 +7005,7 @@
"name": "meta.property-with-attributes.objcpp",
"patterns": [
{
"match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|strong|weak)\\b",
"match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|atomic|strong|weak|nonnull|nullable|null_resettable|null_unspecified|class|direct)\\b",
"name": "keyword.other.property.attribute.objcpp"
}
]
@ -7051,7 +7055,7 @@
]
},
"protocol_type_qualifier": {
"match": "\\b(in|out|inout|oneway|bycopy|byref)\\b",
"match": "\\b(in|out|inout|oneway|bycopy|byref|nonnull|nullable|_Nonnull|_Nullable|_Null_unspecified)\\b",
"name": "storage.modifier.protocol.objcpp"
},
"special_variables": {
@ -7095,4 +7099,4 @@
]
}
}
}
}

View file

@ -1,10 +1,10 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master//syntaxes/objc.tmLanguage.json",
"This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master/syntaxes/objc.tmLanguage.json",
"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/bc7dedd28eebe52b374744d3fb34d77ff441569e",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/11b4b4e2abf581d0f3c6c90ac6632d1b2f974c67",
"name": "Objective-C",
"scopeName": "source.objc",
"patterns": [
@ -283,10 +283,10 @@
"name": "support.constant.cocoa.objc"
},
{
"include": "#c_lang"
"include": "#bracketed_content"
},
{
"include": "#bracketed_content"
"include": "#c_lang"
}
],
"repository": {
@ -499,7 +499,11 @@
"name": "keyword.other.typedef.objc"
},
{
"match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
"match": "\\bin\\b",
"name": "keyword.other.in.objc"
},
{
"match": "\\b(const|extern|register|restrict|static|volatile|inline|__block)\\b",
"name": "storage.modifier.objc"
},
{
@ -527,6 +531,9 @@
{
"include": "#strings"
},
{
"include": "#special_variables"
},
{
"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)?",
"beginCaptures": {
@ -3121,9 +3128,6 @@
{
"include": "#property_directive"
},
{
"include": "#special_variables"
},
{
"include": "#method_super"
},
@ -3509,7 +3513,7 @@
"name": "meta.property-with-attributes.objc",
"patterns": [
{
"match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|strong|weak)\\b",
"match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|atomic|strong|weak|nonnull|nullable|null_resettable|null_unspecified|class|direct)\\b",
"name": "keyword.other.property.attribute.objc"
}
]
@ -3559,7 +3563,7 @@
]
},
"protocol_type_qualifier": {
"match": "\\b(in|out|inout|oneway|bycopy|byref)\\b",
"match": "\\b(in|out|inout|oneway|bycopy|byref|nonnull|nullable|_Nonnull|_Nullable|_Null_unspecified)\\b",
"name": "storage.modifier.protocol.objc"
},
"special_variables": {
@ -3603,4 +3607,4 @@
]
}
}
}
}

View file

@ -2508,7 +2508,29 @@
}
},
{
"c": " initWithTarget:self action:",
"c": " initWithTarget:",
"t": "source.objcpp meta.implementation.objcpp meta.scope.implementation.objcpp meta.function-with-body.objcpp meta.block.objcpp meta.bracket.square.access.objcpp",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
"c": "self",
"t": "source.objcpp meta.implementation.objcpp meta.scope.implementation.objcpp meta.function-with-body.objcpp meta.block.objcpp meta.bracket.square.access.objcpp variable.language.objcpp",
"r": {
"dark_plus": "variable.language: #569CD6",
"light_plus": "variable.language: #0000FF",
"dark_vs": "variable.language: #569CD6",
"light_vs": "variable.language: #0000FF",
"hc_black": "variable: #9CDCFE"
}
},
{
"c": " action:",
"t": "source.objcpp meta.implementation.objcpp meta.scope.implementation.objcpp meta.function-with-body.objcpp meta.block.objcpp meta.bracket.square.access.objcpp",
"r": {
"dark_plus": "default: #D4D4D4",
@ -3090,4 +3112,4 @@
"hc_black": "storage.type: #569CD6"
}
}
]
]