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EACTS,SAAUM","sources":["webpack:///text/node_modules/highlight.js/lib/languages/c.js"],"sourcesContent":["/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction optional(re) {\n return concat('(', re, ')?');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/*\nLanguage: C\nCategory: common, system\nWebsite: https://en.wikipedia.org/wiki/C_(programming_language)\n*/\n\n/** @type LanguageFn */\nfunction c(hljs) {\n // added for historic reasons because `hljs.C_LINE_COMMENT_MODE` does\n // not include such support nor can we be sure all the grammars depending\n // on it would desire this behavior\n const C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', {\n contains: [\n {\n begin: /\\\\\\n/\n }\n ]\n });\n const DECLTYPE_AUTO_RE = 'decltype\\\\(auto\\\\)';\n const NAMESPACE_RE = '[a-zA-Z_]\\\\w*::';\n const TEMPLATE_ARGUMENT_RE = '<[^<>]+>';\n const FUNCTION_TYPE_RE = '(' +\n DECLTYPE_AUTO_RE + '|' +\n optional(NAMESPACE_RE) +\n '[a-zA-Z_]\\\\w*' + optional(TEMPLATE_ARGUMENT_RE) +\n ')';\n const CPP_PRIMITIVE_TYPES = {\n className: 'keyword',\n begin: '\\\\b[a-z\\\\d_]*_t\\\\b'\n };\n\n // https://en.cppreference.com/w/cpp/language/escape\n // \\\\ \\x \\xFF \\u2837 \\u00323747 \\374\n const CHARACTER_ESCAPES = '\\\\\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\\\S)';\n const STRINGS = {\n className: 'string',\n variants: [\n {\n begin: '(u8?|U|L)?\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '(u8?|U|L)?\\'(' + CHARACTER_ESCAPES + \"|.)\",\n end: '\\'',\n illegal: '.'\n },\n hljs.END_SAME_AS_BEGIN({\n begin: /(?:u8?|U|L)?R\"([^()\\\\ ]{0,16})\\(/,\n end: /\\)([^()\\\\ ]{0,16})\"/\n })\n ]\n };\n\n const NUMBERS = {\n className: 'number',\n variants: [\n {\n begin: '\\\\b(0b[01\\']+)'\n },\n {\n begin: '(-?)\\\\b([\\\\d\\']+(\\\\.[\\\\d\\']*)?|\\\\.[\\\\d\\']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)'\n },\n {\n begin: '(-?)(\\\\b0[xX][a-fA-F0-9\\']+|(\\\\b[\\\\d\\']+(\\\\.[\\\\d\\']*)?|\\\\.[\\\\d\\']+)([eE][-+]?[\\\\d\\']+)?)'\n }\n ],\n relevance: 0\n };\n\n const PREPROCESSOR = {\n className: 'meta',\n begin: /#\\s*[a-z]+\\b/,\n end: /$/,\n keywords: {\n 'meta-keyword':\n 'if else elif endif define undef warning error line ' +\n 'pragma _Pragma ifdef ifndef include'\n },\n contains: [\n {\n begin: /\\\\\\n/,\n relevance: 0\n },\n hljs.inherit(STRINGS, {\n className: 'meta-string'\n }),\n {\n className: 'meta-string',\n begin: /<.*?>/\n },\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE\n ]\n };\n\n const TITLE_MODE = {\n className: 'title',\n begin: optional(NAMESPACE_RE) + hljs.IDENT_RE,\n relevance: 0\n };\n\n const FUNCTION_TITLE = optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\\\s*\\\\(';\n\n const CPP_KEYWORDS = {\n keyword: 'int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof ' +\n 'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +\n 'unsigned long volatile static protected bool template mutable if public friend ' +\n 'do goto auto void enum else break extern using asm case typeid wchar_t ' +\n 'short reinterpret_cast|10 default double register explicit signed typename try this ' +\n 'switch continue inline delete alignas alignof constexpr consteval constinit decltype ' +\n 'concept co_await co_return co_yield requires ' +\n 'noexcept static_assert thread_local restrict final override ' +\n 'atomic_bool atomic_char atomic_schar ' +\n 'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +\n 'atomic_ullong new throw return ' +\n 'and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq',\n built_in: 'std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +\n 'auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set ' +\n 'unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos ' +\n 'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +\n 'fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +\n 'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' +\n 'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +\n 'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +\n 'vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary',\n literal: 'true false nullptr NULL'\n };\n\n const EXPRESSION_CONTAINS = [\n PREPROCESSOR,\n CPP_PRIMITIVE_TYPES,\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n NUMBERS,\n STRINGS\n ];\n\n const EXPRESSION_CONTEXT = {\n // This mode covers expression context where we can't expect a function\n // definition and shouldn't highlight anything that looks like one:\n // `return some()`, `else if()`, `(x*sum(1, 2))`\n variants: [\n {\n begin: /=/,\n end: /;/\n },\n {\n begin: /\\(/,\n end: /\\)/\n },\n {\n beginKeywords: 'new throw return else',\n end: /;/\n }\n ],\n keywords: CPP_KEYWORDS,\n contains: EXPRESSION_CONTAINS.concat([\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: CPP_KEYWORDS,\n contains: EXPRESSION_CONTAINS.concat([ 'self' ]),\n relevance: 0\n }\n ]),\n relevance: 0\n };\n\n const FUNCTION_DECLARATION = {\n className: 'function',\n begin: '(' + FUNCTION_TYPE_RE + '[\\\\*&\\\\s]+)+' + FUNCTION_TITLE,\n returnBegin: true,\n end: /[{;=]/,\n excludeEnd: true,\n keywords: CPP_KEYWORDS,\n illegal: /[^\\w\\s\\*&:<>.]/,\n contains: [\n { // to prevent it from being confused as the function title\n begin: DECLTYPE_AUTO_RE,\n keywords: CPP_KEYWORDS,\n relevance: 0\n },\n {\n begin: FUNCTION_TITLE,\n returnBegin: true,\n contains: [ TITLE_MODE ],\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n keywords: CPP_KEYWORDS,\n relevance: 0,\n contains: [\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRINGS,\n NUMBERS,\n CPP_PRIMITIVE_TYPES,\n // Count matching parentheses.\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: CPP_KEYWORDS,\n relevance: 0,\n contains: [\n 'self',\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRINGS,\n NUMBERS,\n CPP_PRIMITIVE_TYPES\n ]\n }\n ]\n },\n CPP_PRIMITIVE_TYPES,\n C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n PREPROCESSOR\n ]\n };\n\n return {\n name: \"C\",\n aliases: [\n 'h'\n ],\n keywords: CPP_KEYWORDS,\n // Until differentiations are added between `c` and `cpp`, `c` will\n // not be auto-detected to avoid auto-detect conflicts between C and C++\n disableAutodetect: true,\n illegal: '</',\n contains: [].concat(\n EXPRESSION_CONTEXT,\n FUNCTION_DECLARATION,\n EXPRESSION_CONTAINS,\n [\n PREPROCESSOR,\n { // containers: ie, `vector <int> rooms (9);`\n begin: '\\\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\\\s*<',\n end: '>',\n keywords: CPP_KEYWORDS,\n contains: [\n 'self',\n CPP_PRIMITIVE_TYPES\n ]\n },\n {\n begin: hljs.IDENT_RE + '::',\n keywords: CPP_KEYWORDS\n },\n {\n className: 'class',\n beginKeywords: 'enum class struct union',\n end: /[{;:<>=]/,\n contains: [\n {\n beginKeywords: \"final class struct\"\n },\n hljs.TITLE_MODE\n ]\n }\n ]),\n exports: {\n preprocessor: PREPROCESSOR,\n strings: STRINGS,\n keywords: CPP_KEYWORDS\n }\n };\n}\n\nmodule.exports = c;\n"],"names":["optional","re","args","map","x","source","join","concat","module","exports","hljs","C_LINE_COMMENT_MODE","COMMENT","contains","begin","DECLTYPE_AUTO_RE","NAMESPACE_RE","FUNCTION_TYPE_RE","CPP_PRIMITIVE_TYPES","className","STRINGS","variants","end","illegal","BACKSLASH_ESCAPE","END_SAME_AS_BEGIN","NUMBERS","relevance","PREPROCESSOR","keywords","inherit","C_BLOCK_COMMENT_MODE","TITLE_MODE","IDENT_RE","FUNCTION_TITLE","CPP_KEYWORDS","keyword","built_in","literal","EXPRESSION_CONTAINS","EXPRESSION_CONTEXT","beginKeywords","FUNCTION_DECLARATION","returnBegin","excludeEnd","name","aliases","disableAutodetect","preprocessor","strings"],"sourceRoot":""}
|