shiki
Version:
A beautiful Syntax Highlighter.
13 lines (12 loc) • 444 kB
JavaScript
import cpp_macro from './cpp-macro.mjs';
import glsl from './glsl.mjs';
import sql from './sql.mjs';
import './c.mjs';
const lang = Object.freeze({ "displayName": "C++", "name": "cpp", "patterns": [{ "include": "#ever_present_context" }, { "include": "#constructor_root" }, { "include": "#destructor_root" }, { "include": "#function_definition" }, { "include": "#operator_overload" }, { "include": "#using_namespace" }, { "include": "#type_alias" }, { "include": "#using_name" }, { "include": "#namespace_alias" }, { "include": "#namespace_block" }, { "include": "#extern_block" }, { "include": "#typedef_class" }, { "include": "#typedef_struct" }, { "include": "#typedef_union" }, { "include": "#misc_keywords" }, { "include": "#standard_declares" }, { "include": "#class_block" }, { "include": "#struct_block" }, { "include": "#union_block" }, { "include": "#enum_block" }, { "include": "#template_isolated_definition" }, { "include": "#template_definition" }, { "include": "#template_explicit_instantiation" }, { "include": "#access_control_keywords" }, { "include": "#block" }, { "include": "#static_assert" }, { "include": "#assembly" }, { "include": "#function_pointer" }, { "include": "#evaluation_context" }], "repository": { "access_control_keywords": { "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "patterns": [{ "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+" }] }, "3": { "name": "storage.type.modifier.access.control.$4.cpp" }, "4": {}, "5": { "name": "punctuation.separator.colon.access.control.cpp" } }, "match": "((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(((?:(?:protected)|(?:private)|(?:public)))(?:\\s+)?(:))" }, "alignas_attribute": { "begin": "alignas\\(", "beginCaptures": { "0": { "name": "punctuation.section.attribute.begin.cpp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.attribute.end.cpp" } }, "name": "support.other.attribute.cpp", "patterns": [{ "include": "#attributes_context" }, { "begin": "\\(", "beginCaptures": {}, "end": "\\)", "endCaptures": {}, "patterns": [{ "include": "#attributes_context" }, { "include": "#string_context" }, { "include": "#ever_present_context" }] }, { "captures": { "1": { "name": "keyword.other.using.directive.cpp" }, "2": { "name": "entity.name.namespace.cpp" } }, "match": "(using)\\s+((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))" }, { "match": ",", "name": "punctuation.separator.attribute.cpp" }, { "match": ":", "name": "punctuation.accessor.attribute.cpp" }, { "match": "(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)(?=::)", "name": "entity.name.namespace.cpp" }, { "match": "(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)", "name": "entity.other.attribute.$0.cpp" }, { "include": "#number_literal" }, { "include": "#ever_present_context" }] }, "alignas_operator": { "begin": "((?<!\\w)alignas(?!\\w))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\()", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignas.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignas.cpp" } }, "contentName": "meta.arguments.operator.alignas", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignas.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, "alignof_operator": { "begin": "((?<!\\w)alignof(?!\\w))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(\\()", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignof.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignof.cpp" } }, "contentName": "meta.arguments.operator.alignof", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignof.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, "assembly": { "begin": "(\\b(?:__asm__|asm)\\b)(?:\\s+)?((?:volatile)?)", "beginCaptures": { "1": { "name": "storage.type.asm.cpp" }, "2": { "name": "storage.modifier.cpp" } }, "end": "(?!\\G)", "endCaptures": {}, "name": "meta.asm.cpp", "patterns": [{ "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "^((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:\\n|$)" }, { "include": "#comments" }, { "begin": "((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.assembly.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.assembly.cpp" } }, "patterns": [{ "begin": '(R?)(")', "beginCaptures": { "1": { "name": "meta.encoding.cpp" }, "2": { "name": "punctuation.definition.string.begin.assembly.cpp" } }, "contentName": "meta.embedded.assembly", "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.assembly.cpp" } }, "name": "string.quoted.double.cpp", "patterns": [{ "include": "source.asm" }, { "include": "source.x86" }, { "include": "source.x86_64" }, { "include": "source.arm" }, { "include": "#backslash_escapes" }, { "include": "#string_escaped_char" }] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.cpp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.assembly.inner.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, { "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "5": { "name": "variable.other.asm.label.cpp" }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "\\[((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))\\]" }, { "match": ":", "name": "punctuation.separator.delimiter.colon.assembly.cpp" }, { "include": "#comments" }] }] }, "assignment_operator": { "match": "\\=", "name": "keyword.operator.assignment.cpp" }, "attributes_context": { "patterns": [{ "include": "#cpp_attributes" }, { "include": "#gcc_attributes" }, { "include": "#ms_attributes" }, { "include": "#alignas_attribute" }] }, "backslash_escapes": { "match": `(?x)\\\\ (
\\\\ |
[abefnprtv'"?] |
[0-3][0-7]{,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" }, "block": { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.cpp" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.cpp" } }, "name": "meta.block.cpp", "patterns": [{ "include": "#function_body_context" }] }, "block_comment": { "begin": "\\s*+(\\/\\*)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.cpp" } }, "end": "\\*\\/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.cpp" } }, "name": "comment.block.cpp" }, "builtin_storage_type_initilizer": { "begin": "\\s*+(?<!\\w)(?:(?:(?:((?:(?:unsigned)|(?:wchar_t)|(?:double)|(?:signed)|(?:short)|(?:float)|(?:auto)|(?:void)|(?:long)|(?:char)|(?:bool)|(?:int)))|((?:(?:uint_least32_t)|(?:uint_least64_t)|(?:uint_least16_t)|(?:uint_fast64_t)|(?:uint_least8_t)|(?:int_least64_t)|(?:int_least32_t)|(?:int_least16_t)|(?:uint_fast16_t)|(?:uint_fast32_t)|(?:int_least8_t)|(?:int_fast16_t)|(?:int_fast32_t)|(?:int_fast64_t)|(?:uint_fast8_t)|(?:int_fast8_t)|(?:suseconds_t)|(?:useconds_t)|(?:uintmax_t)|(?:uintmax_t)|(?:in_port_t)|(?:uintmax_t)|(?:in_addr_t)|(?:blksize_t)|(?:uintptr_t)|(?:intmax_t)|(?:intptr_t)|(?:blkcnt_t)|(?:intmax_t)|(?:u_quad_t)|(?:uint16_t)|(?:uint32_t)|(?:uint64_t)|(?:ssize_t)|(?:fixpt_t)|(?:qaddr_t)|(?:u_short)|(?:int16_t)|(?:int32_t)|(?:int64_t)|(?:uint8_t)|(?:daddr_t)|(?:caddr_t)|(?:swblk_t)|(?:clock_t)|(?:segsz_t)|(?:nlink_t)|(?:time_t)|(?:u_long)|(?:ushort)|(?:quad_t)|(?:mode_t)|(?:size_t)|(?:u_char)|(?:int8_t)|(?:u_int)|(?:uid_t)|(?:off_t)|(?:pid_t)|(?:gid_t)|(?:dev_t)|(?:div_t)|(?:key_t)|(?:ino_t)|(?:id_t)|(?:id_t)|(?:uint))))|((?:(?:pthread_rwlockattr_t)|(?:pthread_mutexattr_t)|(?:pthread_condattr_t)|(?:pthread_rwlock_t)|(?:pthread_mutex_t)|(?:pthread_cond_t)|(?:pthread_attr_t)|(?:pthread_once_t)|(?:pthread_key_t)|(?:pthread_t))))|([a-zA-Z_]\\w*_t))(?!\\w)\\s*+(?<!\\w)(\\()", "beginCaptures": { "1": { "name": "storage.type.primitive.cpp storage.type.built-in.primitive.cpp" }, "2": { "name": "storage.type.cpp storage.type.built-in.cpp" }, "3": { "name": "support.type.posix-reserved.pthread.cpp support.type.built-in.posix-reserved.pthread.cpp" }, "4": { "name": "support.type.posix-reserved.cpp support.type.built-in.posix-reserved.cpp" }, "5": { "name": "punctuation.section.arguments.begin.bracket.round.initializer.cpp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.initializer.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, "case_statement": { "begin": "((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?<!\\w)case(?!\\w))", "beginCaptures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "5": { "name": "keyword.control.case.cpp" } }, "end": ":", "endCaptures": { "0": { "name": "punctuation.separator.colon.case.cpp" } }, "name": "meta.conditional.case.cpp", "patterns": [{ "include": "#evaluation_context" }] }, "class_block": { "begin": "((?<!\\w)class(?!\\w))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?((?:(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*+)?(?:((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(:(?!:)))?)", "beginCaptures": { "0": { "name": "meta.head.class.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "6": { "patterns": [{ "include": "#attributes_context" }, { "include": "#number_literal" }] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "11": { "patterns": [{ "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "((?<!\\w)final(?!\\w))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))" }, { "captures": { "1": { "name": "entity.name.type.class.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:((?<!\\w)final(?!\\w))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))?(?=:|{|$)" }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" }] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:\\s+)?(;)|(;))|(?=[;>\\[\\]=]))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.class.cpp", "patterns": [{ "begin": "\\G ?", "beginCaptures": {}, "end": "(?:\\{|<%|\\?\\?<|(?=;))", "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.class.cpp" } }, "name": "meta.head.class.cpp", "patterns": [{ "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" }] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "beginCaptures": {}, "end": "\\}|%>|\\?\\?>", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.class.cpp" } }, "name": "meta.body.class.cpp", "patterns": [{ "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "beginCaptures": {}, "end": "[\\s]*(?=;)", "endCaptures": {}, "name": "meta.tail.class.cpp", "patterns": [{ "include": "$self" }] }] }, "class_declare": { "captures": { "1": { "name": "storage.type.class.declare.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [{ "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+" }] }, "4": { "name": "entity.name.type.class.cpp" }, "5": { "patterns": [{ "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "(?:\\&((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))){2,}\\&", "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" }] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [{ "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+" }] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [{ "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+" }] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [{ "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+" }] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [{ "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+" }] } }, "match": "((?<!\\w)class(?!\\w))((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))?(?:(?:&|\\*)((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:&|\\*))?((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?=\\S)(?![:{a-zA-Z])" }, "comma": { "match": ",", "name": "punctuation.separator.delimiter.comma.cpp" }, "comma_in_template_argument": { "match": ",", "name": "punctuation.separator.delimiter.comma.template.argument.cpp" }, "comments": { "patterns": [{ "begin": "^(?:\\s+)?+(\\/\\/[!\\/]+)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.documentation.cpp" } }, "end": "(?<=\\n)(?<!\\\\\\n)", "endCaptures": {}, "name": "comment.line.double-slash.documentation.cpp", "patterns": [{ "include": "#line_continuation_character" }, { "match": '(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?', "name": "storage.type.class.doxygen.cpp" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [{ "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" }] }, "3": { "patterns": [{ "match": "(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)", "name": "variable.parameter.cpp" }, { "match": ",", "name": "punctuation.cpp" }] }, "4": { "name": "variable.parameter.cpp" }, "5": { "name": "punctuation.cpp" }, "6": { "name": "variable.parameter.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:\\s+)?(?:in|out)(?:\\s+)?)+)\\])?(\\s+((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(?:(,)(?:\\s+)?((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)))*)" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" }] }, { "captures": { "1": { "name": "punctuation.definition.comment.begin.documentation.cpp" }, "2": { "patterns": [{ "match": '(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?', "name": "storage.type.class.doxygen.cpp" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [{ "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" }] }, "3": { "patterns": [{ "match": "(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)", "name": "variable.parameter.cpp" }, { "match": ",", "name": "punctuation.cpp" }] }, "4": { "name": "variable.parameter.cpp" }, "5": { "name": "punctuation.cpp" }, "6": { "name": "variable.parameter.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:\\s+)?(?:in|out)(?:\\s+)?)+)\\])?(\\s+((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(?:(,)(?:\\s+)?((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)))*)" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" }] }, "3": { "name": "punctuation.definition.comment.end.documentation.cpp" } }, "match": "(\\/\\*[!*]+(?=\\s))(.+)([!*]*\\*\\/)", "name": "comment.block.documentation.cpp" }, { "begin": "(?:\\s+)?+\\/\\*[!*]+(?:(?:\\n|$)|(?=\\s))", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.documentation.cpp" } }, "end": "[!*]*\\*\\/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.documentation.cpp" } }, "name": "comment.block.documentation.cpp", "patterns": [{ "match": '(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?', "name": "storage.type.class.doxygen.cpp" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [{ "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" }] }, "3": { "patterns": [{ "match": "(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)", "name": "variable.parameter.cpp" }, { "match": ",", "name": "punctuation.cpp" }] }, "4": { "name": "variable.parameter.cpp" }, "5": { "name": "punctuation.cpp" }, "6": { "name": "variable.parameter.cpp" } }, "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:\\s+)?(?:in|out)(?:\\s+)?)+)\\])?(\\s+((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(?:(,)(?:\\s+)?((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)))*)" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" }] }, { "include": "#emacs_file_banner" }, { "include": "#block_comment" }, { "include": "#line_comment" }, { "include": "#invalid_comment_end" }] }, "constructor_inline": { "begin": "^((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:(?:(?:constexpr)|(?:consteval)|(?:explicit)|(?:mutable)|(?:virtual)|(?:inline)|(?:friend))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*)((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)(?=\\())", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.constructor.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "5": { "patterns": [{ "include": "#functional_specifiers_pre_parameters" }] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "10": { "name": "storage.type.modifier.calling-convention.cpp" }, "11": { "patterns": [{ "include": "#inline_comment" }] }, "12": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "13": { "name": "comment.block.cpp" }, "14": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "15": { "name": "entity.name.function.constructor.cpp entity.name.function.definition.special.constructor.cpp" } }, "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))", "endCaptures": {}, "name": "meta.function.definition.special.constructor.cpp", "patterns": [{ "begin": "\\G ?", "beginCaptures": {}, "end": "(?:\\{|<%|\\?\\?<|(?=;))", "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.head.function.definition.special.constructor.cpp", "patterns": [{ "include": "#ever_present_context" }, { "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "6": { "name": "keyword.other.default.function.cpp keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.function.cpp keyword.other.delete.constructor.cpp" } }, "match": "(\\=)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(default)|(delete))" }, { "include": "#functional_specifiers_pre_parameters" }, { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.initializers.cpp" } }, "end": "(?=\\{)", "endCaptures": {}, "patterns": [{ "begin": `((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?<!<)<(?!<)(?:(?:(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/)))|(?:"(?:[^"]*|\\\\")")|(?:'(?:[^']*|\\\\')')|\\g<3>|(?:(?:[^'"<>\\/]|\\/[^*])++))*>)\\s*+)?(\\()`, "beginCaptures": { "1": { "name": "entity.name.function.call.initializer.cpp" }, "2": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "3": {}, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "7": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" } }, "contentName": "meta.parameter.initialization", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, { "begin": "((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(\\{)", "beginCaptures": { "1": { "name": "entity.name.function.call.initializer.cpp" }, "2": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" } }, "contentName": "meta.parameter.initialization", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, { "match": ",", "name": "punctuation.separator.delimiter.comma.cpp" }, { "include": "#comments" }] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.special.constructor.cpp" } }, "contentName": "meta.function.definition.parameters.special.constructor", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.special.constructor.cpp" } }, "patterns": [{ "include": "#function_parameter_context" }, { "include": "#evaluation_context" }] }, { "include": "#qualifiers_and_specifiers_post_parameters" }, { "include": "$self" }] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "beginCaptures": {}, "end": "\\}|%>|\\?\\?>", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.body.function.definition.special.constructor.cpp", "patterns": [{ "include": "#function_body_context" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "beginCaptures": {}, "end": "[\\s]*(?=;)", "endCaptures": {}, "name": "meta.tail.function.definition.special.constructor.cpp", "patterns": [{ "include": "$self" }] }] }, "constructor_root": { "begin": `\\s*+((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)\\s*+(((?<!<)<(?!<)(?:(?:\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/)|(?:"(?:[^"]*|\\\\")")|(?:'(?:[^']*|\\\\')')|\\g<8>|(?:(?:[^'"<>\\/]|\\/[^*])++))*>)\\s*+)?::)*+)(((?>(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))::((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:\\10)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?=\\())`, "beginCaptures": { "0": { "name": "meta.head.function.definition.special.constructor.cpp" }, "1": { "name": "storage.type.modifier.calling-convention.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "6": { "patterns": [{ "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.constructor.cpp" }, { "match": "(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)", "name": "entity.name.scope-resolution.constructor.cpp" }, { "include": "#template_call_range" }] }, "7": { "patterns": [{ "include": "#template_call_range" }] }, "8": {}, "9": { "patterns": [{ "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?=:)", "name": "entity.name.type.constructor.cpp" }, { "match": "(?<=:)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.function.definition.special.constructor.cpp" }, { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.constructor.cpp" }] }, "10": {}, "11": { "patterns": [{ "include": "#inline_comment" }] }, "12": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "13": { "name": "comment.block.cpp" }, "14": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "17": { "name": "comment.block.cpp" }, "18": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "21": { "name": "comment.block.cpp" }, "22": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))", "endCaptures": {}, "name": "meta.function.definition.special.constructor.cpp", "patterns": [{ "begin": "\\G ?", "beginCaptures": {}, "end": "(?:\\{|<%|\\?\\?<|(?=;))", "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.head.function.definition.special.constructor.cpp", "patterns": [{ "include": "#ever_present_context" }, { "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "6": { "name": "keyword.other.default.function.cpp keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.function.cpp keyword.other.delete.constructor.cpp" } }, "match": "(\\=)((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(default)|(delete))" }, { "include": "#functional_specifiers_pre_parameters" }, { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.initializers.cpp" } }, "end": "(?=\\{)", "endCaptures": {}, "patterns": [{ "begin": `((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?<!<)<(?!<)(?:(?:(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/)))|(?:"(?:[^"]*|\\\\")")|(?:'(?:[^']*|\\\\')')|\\g<3>|(?:(?:[^'"<>\\/]|\\/[^*])++))*>)\\s*+)?(\\()`, "beginCaptures": { "1": { "name": "entity.name.function.call.initializer.cpp" }, "2": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "3": {}, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "7": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" } }, "contentName": "meta.parameter.initialization", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, { "begin": "((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(\\{)", "beginCaptures": { "1": { "name": "entity.name.function.call.initializer.cpp" }, "2": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" } }, "contentName": "meta.parameter.initialization", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, { "match": ",", "name": "punctuation.separator.delimiter.comma.cpp" }, { "include": "#comments" }] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.special.constructor.cpp" } }, "contentName": "meta.function.definition.parameters.special.constructor", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.special.constructor.cpp" } }, "patterns": [{ "include": "#function_parameter_context" }, { "include": "#evaluation_context" }] }, { "include": "#qualifiers_and_specifiers_post_parameters" }, { "include": "$self" }] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "beginCaptures": {}, "end": "\\}|%>|\\?\\?>", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.body.function.definition.special.constructor.cpp", "patterns": [{ "include": "#function_body_context" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "beginCaptures": {}, "end": "[\\s]*(?=;)", "endCaptures": {}, "name": "meta.tail.function.definition.special.constructor.cpp", "patterns": [{ "include": "$self" }] }] }, "control_flow_keywords": { "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "patterns": [{ "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, "match": "\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+" }] }, "3": { "name": "keyword.control.$3.cpp" } }, "match": "((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\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))" }, "cpp_attributes": { "begin": "\\[\\[", "beginCaptures": { "0": { "name": "punctuation.section.attribute.begin.cpp" } }, "end": "\\]\\]", "endCaptures": { "0": { "name": "punctuation.section.attribute.end.cpp" } }, "name": "support.other.attribute.cpp", "patterns": [{ "include": "#attributes_context" }, { "begin": "\\(", "beginCaptures": {}, "end": "\\)", "endCaptures": {}, "patterns": [{ "include": "#attributes_context" }, { "include": "#string_context" }, { "include": "#ever_present_context" }] }, { "captures": { "1": { "name": "keyword.other.using.directive.cpp" }, "2": { "name": "entity.name.namespace.cpp" } }, "match": "(using)\\s+((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))" }, { "match": ",", "name": "punctuation.separator.attribute.cpp" }, { "match": ":", "name": "punctuation.accessor.attribute.cpp" }, { "match": "(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)(?=::)", "name": "entity.name.namespace.cpp" }, { "match": "(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)", "name": "entity.other.attribute.$0.cpp" }, { "include": "#number_literal" }, { "include": "#ever_present_context" }] }, "curly_initializer": { "begin": `(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:\\s*+(\\/\\*)((?:[^\\*]++|\\*+(?!\\/))*+(\\*\\/))\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|\\A|\\Z)))*(?:((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|thread_local|dynamic_cast|synchronized|static_cast|const_cast|consteval|co_return|protected|constinit|constexpr|co_return|consteval|namespace|constexpr|constexpr|co_await|explicit|volatile|noexcept|co_yield|noexcept|noexcept|requires|typename|decltype|operator|template|continue|co_await|co_yield|volatile|register|restrict|reflexpr|mutable|alignof|include|private|defined|typedef|_Pragma|__asm__|concept|mutable|warning|default|virtual|alignas|public|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|ifndef|define|pragma|export|import|module|catch|throw|const|or_eq|compl|while|ifdef|const|bitor|union|class|undef|error|break|using|endif|goto|line|enum|this|case|else|elif|else|not|try|for|asm|and|xor|new|do|if|or|if)\\b)(?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w)\\s*+(((?<!<)<(?!<)(?:(?:\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*