site/node_modules/shiki/dist/langs/objective-cpp.mjs

28 lines
179 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Objective-C++", "name": "objective-cpp", "patterns": [{ "include": "#cpp_lang" }, { "include": "#anonymous_pattern_1" }, { "include": "#anonymous_pattern_2" }, { "include": "#anonymous_pattern_3" }, { "include": "#anonymous_pattern_4" }, { "include": "#anonymous_pattern_5" }, { "include": "#apple_foundation_functional_macros" }, { "include": "#anonymous_pattern_7" }, { "include": "#anonymous_pattern_8" }, { "include": "#anonymous_pattern_9" }, { "include": "#anonymous_pattern_10" }, { "include": "#anonymous_pattern_11" }, { "include": "#anonymous_pattern_12" }, { "include": "#anonymous_pattern_13" }, { "include": "#anonymous_pattern_14" }, { "include": "#anonymous_pattern_15" }, { "include": "#anonymous_pattern_16" }, { "include": "#anonymous_pattern_17" }, { "include": "#anonymous_pattern_18" }, { "include": "#anonymous_pattern_19" }, { "include": "#anonymous_pattern_20" }, { "include": "#anonymous_pattern_21" }, { "include": "#anonymous_pattern_22" }, { "include": "#anonymous_pattern_23" }, { "include": "#anonymous_pattern_24" }, { "include": "#anonymous_pattern_25" }, { "include": "#anonymous_pattern_26" }, { "include": "#anonymous_pattern_27" }, { "include": "#anonymous_pattern_28" }, { "include": "#anonymous_pattern_29" }, { "include": "#anonymous_pattern_30" }, { "include": "#bracketed_content" }, { "include": "#c_lang" }], "repository": { "anonymous_pattern_1": { "begin": "((@)(interface|protocol))(?!.+;)\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*((:)(?:\\s*)([A-Za-z][A-Za-z0-9]*))?(\\s|\\n)?", "captures": { "1": { "name": "storage.type.objcpp" }, "2": { "name": "punctuation.definition.storage.type.objcpp" }, "4": { "name": "entity.name.type.objcpp" }, "6": { "name": "punctuation.definition.entity.other.inherited-class.objcpp" }, "7": { "name": "entity.other.inherited-class.objcpp" }, "8": { "name": "meta.divider.objcpp" }, "9": { "name": "meta.inherited-class.objcpp" } }, "contentName": "meta.scope.interface.objcpp", "end": "((@)end)\\b", "name": "meta.interface-or-protocol.objcpp", "patterns": [{ "include": "#interface_innards" }] }, "anonymous_pattern_10": { "captures": { "1": { "name": "punctuation.definition.keyword.objcpp" } }, "match": "(@)(defs|encode)\\b", "name": "keyword.other.objcpp" }, "anonymous_pattern_11": { "match": "\\bid\\b", "name": "storage.type.id.objcpp" }, "anonymous_pattern_12": { "match": "\\b(IBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class|instancetype)\\b", "name": "storage.type.objcpp" }, "anonymous_pattern_13": { "captures": { "1": { "name": "punctuation.definition.storage.type.objcpp" } }, "match": "(@)(class|protocol)\\b", "name": "storage.type.objcpp" }, "anonymous_pattern_14": { "begin": "((@)selector)\\s*(\\()", "beginCaptures": { "1": { "name": "storage.type.objcpp" }, "2": { "name": "punctuation.definition.storage.type.objcpp" }, "3": { "name": "punctuation.definition.storage.type.objcpp" } }, "contentName": "meta.selector.method-name.objcpp", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.definition.storage.type.objcpp" } }, "name": "meta.selector.objcpp", "patterns": [{ "captures": { "1": { "name": "punctuation.separator.arguments.objcpp" } }, "match": "\\b(?:[a-zA-Z_:][\\w]*)+", "name": "support.function.any-method.name-of-parameter.objcpp" }] }, "anonymous_pattern_15": { "captures": { "1": { "name": "punctuation.definition.storage.modifier.objcpp" } }, "match": "(@)(synchronized|public|package|private|protected)\\b", "name": "storage.modifier.objcpp" }, "anonymous_pattern_16": { "match": "\\b(YES|NO|Nil|nil)\\b", "name": "constant.language.objcpp" }, "anonymous_pattern_17": { "match": "\\bNSApp\\b", "name": "support.variable.foundation.objcpp" }, "anonymous_pattern_18": { "captures": { "1": { "name": "punctuation.whitespace.support.function.cocoa.leopard.objcpp" }, "2": { "name": "support.function.cocoa.leopard.objcpp" } }, "match": "(\\s*)\\b(NS(Rect(ToCGRect|FromCGRect)|MakeCollectable|S(tringFromProtocol|ize(ToCGSize|FromCGSize))|Draw(NinePartImage|ThreePartImage)|P(oint(ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskF
\\\\ |
[abefnprtv'"?] |
[0-3]\\d{,2} |
[4-7]\\d? |
x[a-fA-F0-9]{,2} |
u[a-fA-F0-9]{,4} |
U[a-fA-F0-9]{,8} )`, "name": "constant.character.escape.objcpp" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.objcpp" }] }, "string_placeholder": { "patterns": [{ "match": "(?x) %\n(\\d+\\$)? # field (argument #)\n[#0\\- +']* # flags\n[,;:_]? # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%] # conversion type", "name": "constant.other.placeholder.objcpp" }, { "captures": { "1": { "name": "invalid.illegal.placeholder.objcpp" } }, "match": '(%)(?!"\\s*(PRI|SCN))' }] }, "strings": { "patterns": [{ "begin": '"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objcpp" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.objcpp" } }, "name": "string.quoted.double.objcpp", "patterns": [{ "include": "#string_escaped_char" }, { "include": "#string_placeholder" }, { "include": "#line_continuation_character" }] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objcpp" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objcpp" } }, "name": "string.quoted.single.objcpp", "patterns": [{ "include": "#string_escaped_char" }, { "include": "#line_continuation_character" }] }] }, "switch_conditional_parentheses": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.objcpp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.parens.end.bracket.round.conditional.switch.objcpp" } }, "name": "meta.conditional.switch.objcpp", "patterns": [{ "include": "#conditional_context" }] }, "switch_statement": { "begin": "(((?<!\\w)switch(?!\\w)))", "beginCaptures": { "1": { "name": "meta.head.switch.objcpp" }, "2": { "name": "keyword.control.switch.objcpp" } }, "end": "(?:(?<=\\})|(?=[;>\\[\\]=]))", "name": "meta.block.switch.objcpp", "patterns": [{ "begin": "\\G ?", "end": "((?:\\{|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.switch.objcpp" } }, "name": "meta.head.switch.objcpp", "patterns": [{ "include": "#switch_conditional_parentheses" }, { "include": "$base" }] }, { "begin": "(?<=\\{)", "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.switch.objcpp" } }, "name": "meta.body.switch.objcpp", "patterns": [{ "include": "#default_statement" }, { "include": "#case_statement" }, { "include": "$base" }, { "include": "#block_innards" }] }, { "begin": "(?<=})[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "name": "meta.tail.switch.objcpp", "patterns": [{ "include": "$base" }] }] }, "vararg_ellipses": { "match": "(?<!\\.)\\.\\.\\.(?!\\.)", "name": "punctuation.vararg-ellipses.objcpp" } } }, "comment": { "patterns": [{ "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.objcpp" } }, "end": "\\*/", "name": "comment.block.objcpp" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.objcpp" } }, "end": "(?!\\G)", "patterns": [{ "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.objcpp" } }, "end": "\\n", "name": "comment.line.double-slash.objcpp", "patterns": [{ "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.objcpp" }] }] }] }, "cpp_lang": { "patterns": [{ "include": "#special_block" }, { "include": "#strings" }, { "match": "\\b(friend|explicit|virtual|override|final|noexcept)\\b", "name": "storage.modifier.objcpp" }, { "match": "\\b(private:|protected:|public:)", "name": "storage.type.modifier.access.objcpp" }, { "match": "\\b(catch|try|throw|using)\\b", "name": "keyword.control.objcpp" }, { "match": "\\bdelete\\b(\\s*\\[\\])?|\\bnew\\b(?!])", "name": "keyword.control.objcpp" }, { "match": "\\b(f|m)[A-Z]\\w*\\b", "name": "variable.other.readwrite.member.objcpp" }, { "match": "\\bthis\\b", "name": "variable.language.this.objcpp" }, {
\\\\ |
[abefnprtv'"?] |
[0-3]\\d{,2} |
[4-7]\\d? |
x[a-fA-F0-9]{,2} |
u[a-fA-F0-9]{,4} |
U[a-fA-F0-9]{,8} )`, "name": "constant.character.escape.objcpp" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.objcpp" }] }, "string_placeholder-c": { "patterns": [{ "match": "(?x) %\n(\\d+\\$)? # field (argument #)\n[#0\\- +']* # flags\n[,;:_]? # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%] # conversion type", "name": "constant.other.placeholder.objcpp" }] }, "strings": { "patterns": [{ "begin": '(u|u8|U|L)?"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objcpp" }, "1": { "name": "meta.encoding.objcpp" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.objcpp" } }, "name": "string.quoted.double.objcpp", "patterns": [{ "match": "\\\\u\\h{4}|\\\\U\\h{8}", "name": "constant.character.escape.objcpp" }, { "match": `\\\\['"?\\\\abfnrtv]`, "name": "constant.character.escape.objcpp" }, { "match": "\\\\[0-7]{1,3}", "name": "constant.character.escape.objcpp" }, { "match": "\\\\x\\h+", "name": "constant.character.escape.objcpp" }, { "include": "#string_placeholder-c" }] }, { "begin": '(u|u8|U|L)?R"(?:([^ ()\\\\\\t]{0,16})|([^ ()\\\\\\t]*))\\(', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objcpp" }, "1": { "name": "meta.encoding.objcpp" }, "3": { "name": "invalid.illegal.delimiter-too-long.objcpp" } }, "end": '\\)\\2(\\3)"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.objcpp" }, "1": { "name": "invalid.illegal.delimiter-too-long.objcpp" } }, "name": "string.quoted.double.raw.objcpp" }] }, "strings-c": { "patterns": [{ "begin": '"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objcpp" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.objcpp" } }, "name": "string.quoted.double.objcpp", "patterns": [{ "include": "#string_escaped_char-c" }, { "include": "#string_placeholder-c" }, { "include": "#line_continuation_character" }] }, { "begin": "(?-mix:(?<![\\da-fA-F])')", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objcpp" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objcpp" } }, "name": "string.quoted.single.objcpp", "patterns": [{ "include": "#string_escaped_char-c" }, { "include": "#line_continuation_character" }] }] }, "template_call_innards": { "captures": { "0": { "name": "meta.template.call.objcpp", "patterns": [{ "include": "#storage_types_c" }, { "include": "#constants" }, { "include": "#scope_resolution" }, { "match": "(?<!\\w)[a-zA-Z_]\\w*(?!\\w)", "name": "storage.type.user-defined.objcpp" }, { "include": "#operators" }, { "include": "#number_literal" }, { "include": "#strings" }, { "match": ",", "name": "punctuation.separator.comma.template.argument.objcpp" }] } }, "match": "<(?:[\\s<>,\\w])*>\\s*" }, "template_definition": { "begin": "(?-mix:(?<!\\w)(template)\\s*(<))", "beginCaptures": { "1": { "name": "storage.type.template.objcpp" }, "2": { "name": "punctuation.section.angle-brackets.start.template.definition.objcpp" } }, "end": "(?-mix:(>))", "endCaptures": { "1": { "name": "punctuation.section.angle-brackets.end.template.definition.objcpp" } }, "name": "meta.template.definition.objcpp", "patterns": [{ "include": "#scope_resolution" }, { "include": "#template_definition_argument" }, { "include": "#template_call_innards" }] }, "template_definition_argument": { "captures": { "2": { "name": "storage.type.template.argument.$1.objcpp" }, "3": { "name": "storage.type.template.argument.$2.objcpp" }, "4": { "name": "entity.name.type.template.objcpp" }, "5": { "name": "storage.type.template.objcpp" }, "6": { "name": "keyword.operator.ellipsis.template.definition.objcpp" }, "7": { "name": "entity.name.type.template.objcpp" }, "8": { "name": "storage.type.template.objcpp" }, "9": { "name": "entity.name.type.template.objcpp" }, "10": { "name": "keyword.operator.assignment.objcpp" }, "11": { "
\\\\ |
[abefnprtv'"?] |
[0-3]\\d{,2} |
[4-7]\\d? |
x[a-fA-F0-9]{,2} |
u[a-fA-F0-9]{,4} |
U[a-fA-F0-9]{,8} )`, "name": "constant.character.escape.objcpp" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.objcpp" }] }, "string_placeholder": { "patterns": [{ "match": "(?x) %\n(\\d+\\$)?\n[#0\\- +']*\n[,;:_]?\n((-?\\d+)|\\*(-?\\d+\\$)?)?\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?\n[diouxXDOUeEfFgGaACcSspn%]", "name": "constant.other.placeholder.objcpp" }, { "captures": { "1": { "name": "invalid.illegal.placeholder.objcpp" } }, "match": '(%)(?!"\\s*(PRI|SCN))' }] } }, "scopeName": "source.objcpp" });
var objectiveCpp = [
lang
];
export { objectiveCpp as default };