UNPKG

tm-grammars

Version:
1,404 lines 342 kB
{ "displayName": "C++", "name": "cpp-macro", "patterns": [ { "include": "#ever_present_context" }, { "include": "#constructor_root" }, { "include": "#destructor_root" }, { "include": "#function_definition" }, { "include": "#operator_overload" }, { "include": "#using_namespace" }, { "include": "source.cpp#type_alias" }, { "include": "source.cpp#using_name" }, { "include": "source.cpp#namespace_alias" }, { "include": "#namespace_block" }, { "include": "#extern_block" }, { "include": "#typedef_class" }, { "include": "#typedef_struct" }, { "include": "#typedef_union" }, { "include": "source.cpp#misc_keywords" }, { "include": "source.cpp#standard_declares" }, { "include": "#class_block" }, { "include": "#struct_block" }, { "include": "#union_block" }, { "include": "#enum_block" }, { "include": "source.cpp#template_isolated_definition" }, { "include": "#template_definition" }, { "include": "source.cpp#template_explicit_instantiation" }, { "include": "source.cpp#access_control_keywords" }, { "include": "#block" }, { "include": "#static_assert" }, { "include": "#assembly" }, { "include": "#function_pointer" }, { "include": "#evaluation_context" } ], "repository": { "alignas_attribute": { "begin": "alignas\\(", "beginCaptures": { "0": { "name": "punctuation.section.attribute.begin.cpp" } }, "end": "\\)|(?=(?<!\\\\)\\n)", "endCaptures": { "0": { "name": "punctuation.section.attribute.end.cpp" } }, "name": "support.other.attribute.cpp", "patterns": [ { "include": "#attributes_context" }, { "begin": "\\(", "beginCaptures": { }, "end": "\\)|(?=(?<!\\\\)\\n)", "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-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w))" }, { "match": ",", "name": "punctuation.separator.attribute.cpp" }, { "match": ":", "name": "punctuation.accessor.attribute.cpp" }, { "match": "(?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w)(?=::)", "name": "entity.name.namespace.cpp" }, { "match": "(?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w)", "name": "entity.other.attribute.$0.cpp" }, { "include": "source.cpp#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": "source.cpp#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": "\\)|(?=(?<!\\\\)\\n)", "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": "source.cpp#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": "\\)|(?=(?<!\\\\)\\n)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignof.cpp" } }, "patterns": [ { "include": "#evaluation_context" } ] }, "assembly": { "begin": "\\b(__asm__|asm)\\b\\s+{0,1}((?:volatile)?)", "beginCaptures": { "1": { "name": "storage.type.asm.cpp" }, "2": { "name": "storage.modifier.cpp" } }, "end": "(?!\\G)|(?=(?<!\\\\)\\n)", "endCaptures": { }, "name": "meta.asm.cpp", "patterns": [ { "captures": { "1": { "patterns": [ { "include": "source.cpp#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": "source.cpp#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": "\\)|(?=(?<!\\\\)\\n)", "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": "\"|(?=(?<!\\\\)\\n)", "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": "source.cpp#backslash_escapes" }, { "include": "#string_escaped_char" } ] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.cpp" } }, "end": "\\)|(?=(?<!\\\\)\\n)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.assembly.inner.cpp" } }, "patterns": [ { "include": "#evaluation_context" } ] }, { "captures": { "1": { "patterns": [ { "include": "source.cpp#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": "source.cpp#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-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*)((?:\\s*+(/\\*)((?:[^*]++|\\*+(?!/))*+(\\*/))\\s*+)+|\\s++|(?<=\\W)|(?=\\W)|^|\\n?$|\\A|\\Z)]" }, { "match": ":", "name": "punctuation.separator.delimiter.colon.assembly.cpp" }, { "include": "#comments" } ] } ] }, "attributes_context": { "patterns": [ { "include": "#cpp_attributes" }, { "include": "#gcc_attributes" }, { "include": "#ms_attributes" }, { "include": "#alignas_attribute" } ] }, "block": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.cpp" } }, "end": "}|(?=(?<!\\\\)\\n)", "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": "\\*/|(?=(?<!\\\\)\\n)", "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|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|uint))|(pthread_(?:rwlockattr_|mutexattr_|condattr_|rwlock_|mutex_|cond_|attr_|once_|key_|)t))|([A-Z_a-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": "\\)|(?=(?<!\\\\)\\n)", "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": "source.cpp#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": ":|(?=(?<!\\\\)\\n)", "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-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{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" }, "10": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "11": { "patterns": [ { "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "source.cpp#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" }, "10": { "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "2": { "patterns": [ { "include": "source.cpp#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": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" } }, "match": "((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{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-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "source.cpp#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": "source.cpp#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" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" }, "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": "source.cpp#number_literal" } ] }, "7": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" } }, "end": "(?:(?:(?<=}|%>|\\?\\?>)\\s+{0,1}(;)|(;))|(?=[];=>\\[]))|(?=(?<!\\\\)\\n)", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.class.cpp", "patterns": [ { "begin": "\\G ?", "beginCaptures": { }, "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?<!\\\\)\\n)", "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": "}|%>|\\?\\?>|(?=(?<!\\\\)\\n)", "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*(?=;)|(?=(?<!\\\\)\\n)", "endCaptures": { }, "name": "meta.tail.class.cpp", "patterns": [ { "include": "$self" } ] } ] }, "comments": { "patterns": [ { "begin": "^\\s+{1,0}(//[!/]+)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.documentation.cpp" } }, "end": "(?<=\\n)(?<!\\\\\\n)|(?=(?<!\\\\)\\n)", "endCaptures": { }, "name": "comment.line.double-slash.documentation.cpp", "patterns": [ { "include": "source.cpp#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?))\\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])[@\\\\][cp])\\s+(\\S+)" }, { "match": "(?<=[!*/\\s])[@\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|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-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{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+{0,1}(?:in|out)\\s+{0,1})+)])?(\\s+((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w))(?:(,)\\s+{0,1}((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w)))*)" }, { "match": "(?<=[!*/\\s])[@\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|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?))\\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])[@\\\\][cp])\\s+(\\S+)" }, { "match": "(?<=[!*/\\s])[@\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|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-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{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+{0,1}(?:in|out)\\s+{0,1})+)])?(\\s+((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w))(?:(,)\\s+{0,1}((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w)))*)" }, { "match": "(?<=[!*/\\s])[@\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|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+{1,0}/\\*[!*]+(?:(?:\\n|$)|(?=\\s))", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.documentation.cpp" } }, "end": "[!*]*\\*/|(?=(?<!\\\\)\\n)", "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?))\\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])[@\\\\][cp])\\s+(\\S+)" }, { "match": "(?<=[!*/\\s])[@\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|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-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{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+{0,1}(?:in|out)\\s+{0,1})+)])?(\\s+((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w))(?:(,)\\s+{0,1}((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w)))*)" }, { "match": "(?<=[!*/\\s])[@\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|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": "source.cpp#emacs_file_banner" }, { "include": "#block_comment" }, { "include": "#line_comment" }, { "include": "source.cpp#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))*)((?:__(?:cdec|clrcal|stdcal|fastcal|thiscal|vectorcal)l)?)((?:\\s*+(/\\*)((?:[^*]++|\\*+(?!/))*+(\\*/))\\s*+)+|\\s++|(?<=\\W)|(?=\\W)|^|\\n?$|\\A|\\Z)((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))*(?!\\w)(?=\\())", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.constructor.cpp" }, "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "10": { "name": "storage.type.modifier.calling-convention.cpp" }, "11": { "patterns": [ { "include": "source.cpp#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" }, "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": "source.cpp#functional_specifiers_pre_parameters" } ] }, "6": { "patterns": [ { "include": "source.cpp#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" } }, "end": "(?:(?<=}|%>|\\?\\?>)|(?=[];=>\\[]))|(?=(?<!\\\\)\\n)", "endCaptures": { }, "name": "meta.function.definition.special.constructor.cpp", "patterns": [ { "begin": "\\G ?", "beginCaptures": { }, "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?<!\\\\)\\n)", "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": "source.cpp#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": "source.cpp#functional_specifiers_pre_parameters" }, { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.initializers.cpp" } }, "end": "(?=\\{)|(?=(?<!\\\\)\\n)", "endCaptures": { }, "patterns": [ { "begin": "((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{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": "\\)|(?=(?<!\\\\)\\n)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" } }, "patterns": [ { "include": "#evaluation_context" } ] }, { "begin": "((?<!\\w)(?:[A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{8}))(?:[0-9A-Z_a-z]|\\\\(?:u\\h{4}|U\\h{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": "}|(?=(?<!\\\\)\\n)", "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": "\\)|(?=(?<!\\\\)\\n)", "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.special.constructor.cpp" } }, "patterns": [ { "include": "#function_parameter_context" }, { "include": "#evaluation_context" } ] }, { "include": "source.cpp#qualifiers_and_specifiers_post_parameters" }, { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "beginCaptures": { }, "end": "}|%>|\\?\\?>|(?=(?<!\\\\)\\n)", "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*(?=;)|(?=(?<!\\\\)\\n)", "endCaptures": { }, "name": "meta.tail.function.definition.special.constructor.cpp", "patterns": [ { "include": "$self" } ] } ] }, "constructor_root": { "begin": "\\s*+((?:__(?:cdec|clrcal|stdcal|fastcal|thiscal|vectorcal)l)?)((?:\\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|co_await|explicit|volatile|noexcept|co_yield|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|s