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

21 lines
109 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Objective-C", "name": "objective-c", "patterns": [{ "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.objc" }, "2": { "name": "punctuation.definition.storage.type.objc" }, "4": { "name": "entity.name.type.objc" }, "6": { "name": "punctuation.definition.entity.other.inherited-class.objc" }, "7": { "name": "entity.other.inherited-class.objc" }, "8": { "name": "meta.divider.objc" }, "9": { "name": "meta.inherited-class.objc" } }, "contentName": "meta.scope.interface.objc", "end": "((@)end)\\b", "name": "meta.interface-or-protocol.objc", "patterns": [{ "include": "#interface_innards" }] }, "anonymous_pattern_10": { "captures": { "1": { "name": "punctuation.definition.keyword.objc" } }, "match": "(@)(defs|encode)\\b", "name": "keyword.other.objc" }, "anonymous_pattern_11": { "match": "\\bid\\b", "name": "storage.type.id.objc" }, "anonymous_pattern_12": { "match": "\\b(IBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class|instancetype)\\b", "name": "storage.type.objc" }, "anonymous_pattern_13": { "captures": { "1": { "name": "punctuation.definition.storage.type.objc" } }, "match": "(@)(class|protocol)\\b", "name": "storage.type.objc" }, "anonymous_pattern_14": { "begin": "((@)selector)\\s*(\\()", "beginCaptures": { "1": { "name": "storage.type.objc" }, "2": { "name": "punctuation.definition.storage.type.objc" }, "3": { "name": "punctuation.definition.storage.type.objc" } }, "contentName": "meta.selector.method-name.objc", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.definition.storage.type.objc" } }, "name": "meta.selector.objc", "patterns": [{ "captures": { "1": { "name": "punctuation.separator.arguments.objc" } }, "match": "\\b(?:[a-zA-Z_:][\\w]*)+", "name": "support.function.any-method.name-of-parameter.objc" }] }, "anonymous_pattern_15": { "captures": { "1": { "name": "punctuation.definition.storage.modifier.objc" } }, "match": "(@)(synchronized|public|package|private|protected)\\b", "name": "storage.modifier.objc" }, "anonymous_pattern_16": { "match": "\\b(YES|NO|Nil|nil)\\b", "name": "constant.language.objc" }, "anonymous_pattern_17": { "match": "\\bNSApp\\b", "name": "support.variable.foundation.objc" }, "anonymous_pattern_18": { "captures": { "1": { "name": "punctuation.whitespace.support.function.cocoa.leopard.objc" }, "2": { "name": "support.function.cocoa.leopard.objc" } }, "match": "(\\s*)\\b(NS(Rect(ToCGRect|FromCGRect)|MakeCollectable|S(tringFromProtocol|ize(ToCGSize|FromCGSize))|Draw(NinePartImage|ThreePartImage)|P(oint(ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))\\b" }, "anonymous_pattern_19": { "captures": { "1": { "name": "punctuation
\\\\ |
[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.objc" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.objc" }] }, "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.objc" }, { "captures": { "1": { "name": "invalid.illegal.placeholder.objc" } }, "match": '(%)(?!"\\s*(PRI|SCN))' }] }, "strings": { "patterns": [{ "begin": '"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.double.objc", "patterns": [{ "include": "#string_escaped_char" }, { "include": "#string_placeholder" }, { "include": "#line_continuation_character" }] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.single.objc", "patterns": [{ "include": "#string_escaped_char" }, { "include": "#line_continuation_character" }] }] }, "switch_conditional_parentheses": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.objc" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.parens.end.bracket.round.conditional.switch.objc" } }, "name": "meta.conditional.switch.objc", "patterns": [{ "include": "#conditional_context" }] }, "switch_statement": { "begin": "(((?<!\\w)switch(?!\\w)))", "beginCaptures": { "1": { "name": "meta.head.switch.objc" }, "2": { "name": "keyword.control.switch.objc" } }, "end": "(?:(?<=\\})|(?=[;>\\[\\]=]))", "name": "meta.block.switch.objc", "patterns": [{ "begin": "\\G ?", "end": "((?:\\{|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.switch.objc" } }, "name": "meta.head.switch.objc", "patterns": [{ "include": "#switch_conditional_parentheses" }, { "include": "$base" }] }, { "begin": "(?<=\\{)", "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.switch.objc" } }, "name": "meta.body.switch.objc", "patterns": [{ "include": "#default_statement" }, { "include": "#case_statement" }, { "include": "$base" }, { "include": "#block_innards" }] }, { "begin": "(?<=})[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "name": "meta.tail.switch.objc", "patterns": [{ "include": "$base" }] }] }, "vararg_ellipses": { "match": "(?<!\\.)\\.\\.\\.(?!\\.)", "name": "punctuation.vararg-ellipses.objc" } } }, "comment": { "patterns": [{ "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.objc" } }, "end": "\\*/", "name": "comment.block.objc" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.objc" } }, "end": "(?!\\G)", "patterns": [{ "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.objc" } }, "end": "\\n", "name": "comment.line.double-slash.objc", "patterns": [{ "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.objc" }] }] }] }, "disabled": { "begin": "^\\s*#\\s*if(n?def)?\\b.*$", "comment": "eat nested preprocessor if(def)s", "end": "^\\s*#\\s*endif\\b.*$", "patterns": [{ "include": "#disabled" }, { "include": "#pragma-mark" }] }, "implementation_innards": { "patterns": [{ "include": "#preprocessor-rule-enabled-implementation" }, { "include": "#preprocessor-rule-disabled-implementation" }, { "include": "#preprocessor-rule-other-implementation" }, { "include": "#property_directive" }, { "include": "#method_super" }, { "include": "$base" }] }, "interface_innards": { "patterns": [{ "include": "#preprocessor-rule-enabled-interface" }, { "include": "#preprocessor-rule-disabled-interface" }, { "
\\\\ |
[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.objc" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.objc" }] }, "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.objc" }, { "captures": { "1": { "name": "invalid.illegal.placeholder.objc" } }, "match": '(%)(?!"\\s*(PRI|SCN))' }] } }, "scopeName": "source.objc", "aliases": ["objc"] });
var objective_c = [
lang
];
export { objective_c as default };