{ "information_for_contributors": [ "This file has been converted from https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master//syntaxes/cpp.tmLanguage.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/85ef67461698ec3c0b64411a53705daa0b68fc13", "name": "C++", "scopeName": "source.cpp", "patterns": [ { "include": "#source_wrapper" } ], "repository": { "decltype_specifier": { "contentName": "meta.arguments.decltype.cpp", "begin": "((?|\\?\\?>)|(?=[;>\\[\\]=]))", "patterns": [ { "name": "meta.head.switch.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.switch.cpp" } }, "patterns": [ { "include": "#switch_conditional_parentheses" }, { "include": "#root_context" } ] }, { "name": "meta.body.switch.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.switch.cpp" } }, "patterns": [ { "include": "#default_statement" }, { "include": "#case_statement" }, { "include": "#root_context" }, { "include": "#block_innards" } ] }, { "name": "meta.tail.switch.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "#root_context" } ] } ] }, "cpp_attributes": { "name": "support.other.attribute.cpp", "begin": "(\\[\\[)", "beginCaptures": { "1": { "name": "punctuation.section.attribute.begin.cpp" } }, "end": "(\\]\\])", "endCaptures": { "1": { "name": "punctuation.section.attribute.end.cpp" } }, "patterns": [ { "include": "#attributes_context" }, { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#attributes_context" }, { "include": "#string_context_c" } ] }, { "match": "(using)\\s+((?]*|[^>]*+<[^>]*+>)++>\\s*", "captures": { "0": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] } } }, "template_call_range": { "name": "meta.template.call.cpp", "begin": "(<)", "beginCaptures": { "1": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "patterns": [ { "include": "#template_call_context" } ] }, "template_isolated_definition": { "match": "(?\\s*$)", "captures": { "1": { "name": "storage.type.template.cpp" }, "2": { "name": "punctuation.section.angle-brackets.start.template.definition.cpp" }, "3": { "name": "meta.template.definition.cpp", "patterns": [ { "include": "#template_definition_context" } ] }, "4": { "name": "punctuation.section.angle-brackets.end.template.definition.cpp" } } }, "template_definition": { "name": "meta.template.definition.cpp", "begin": "(?)", "endCaptures": { "1": { "name": "punctuation.section.angle-brackets.end.template.definition.cpp" } }, "patterns": [ { "begin": "((?<=\\w)\\s*<)", "beginCaptures": { "1": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "patterns": [ { "include": "#template_call_context" } ] }, { "include": "#template_definition_context" } ] }, "template_argument_defaulted": { "match": "(?<=<|,)\\s*((?:(?:[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+)*)((?:[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*([=])", "captures": { "1": { "name": "storage.type.template.cpp" }, "2": { "name": "entity.name.type.template.cpp" }, "3": { "name": "keyword.operator.assignment.cpp" } } }, "template_definition_argument": { "match": "(?:(?:\\s*((?:[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})))*)|((?:(?:[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+)+)((?:[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})))*))|((?:[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*((?:[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*(?:(,)|(?=>|$))", "captures": { "1": { "name": "storage.type.template.argument.$1.cpp" }, "2": { "name": "storage.type.template.argument.$2.cpp" }, "3": { "name": "entity.name.type.template.cpp" }, "4": { "name": "storage.type.template.cpp" }, "5": { "name": "ellipses.cpp punctuation.vararg-ellipses.template.definition.cpp" }, "6": { "name": "entity.name.type.template.cpp" }, "7": { "name": "comma.cpp punctuation.separator.template.argument.cpp" } } }, "scope_resolution": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] } } }, "scope_resolution_inner_generated": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] }, "2": { "name": "entity.name.scope-resolution.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" } } }, "scope_resolution_template_call": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_template_call_inner_generated" } ] } } }, "scope_resolution_template_call_inner_generated": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_template_call_inner_generated" } ] }, "2": { "name": "entity.name.scope-resolution.template.call.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" } } }, "scope_resolution_template_definition": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_template_definition_inner_generated" } ] } } }, "scope_resolution_template_definition_inner_generated": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_template_definition_inner_generated" } ] }, "2": { "name": "entity.name.scope-resolution.template.definition.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" } } }, "scope_resolution_function_call": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_function_call_inner_generated" } ] } } }, "scope_resolution_function_call_inner_generated": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_function_call_inner_generated" } ] }, "2": { "name": "entity.name.scope-resolution.function.call.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" } } }, "scope_resolution_function_definition": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_function_definition_inner_generated" } ] } } }, "scope_resolution_function_definition_inner_generated": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_function_definition_inner_generated" } ] }, "2": { "name": "entity.name.scope-resolution.function.definition.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" } } }, "scope_resolution_namespace_alias": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_namespace_alias_inner_generated" } ] } } }, "scope_resolution_namespace_alias_inner_generated": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_namespace_alias_inner_generated" } ] }, "2": { "name": "entity.name.scope-resolution.namespace.alias.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" } } }, "scope_resolution_namespace_using": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_namespace_using_inner_generated" } ] } } }, "scope_resolution_namespace_using_inner_generated": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_namespace_using_inner_generated" } ] }, "2": { "name": "entity.name.scope-resolution.namespace.using.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" } } }, "scope_resolution_namespace_block": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_namespace_block_inner_generated" } ] } } }, "scope_resolution_namespace_block_inner_generated": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_namespace_block_inner_generated" } ] }, "2": { "name": "entity.name.scope-resolution.namespace.block.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" } } }, "scope_resolution_function_definition_operator_overload": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_function_definition_operator_overload_inner_generated" } ] } } }, "scope_resolution_function_definition_operator_overload_inner_generated": { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_function_definition_operator_overload_inner_generated" } ] }, "2": { "name": "entity.name.scope-resolution.function.definition.operator-overload.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" } } }, "qualified_type": { "match": "\\s*(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*((?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.])", "captures": { "0": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "(?:class|struct|union|enum)", "name": "storage.type.$0.cpp" }, { "include": "#function_type" }, { "include": "#storage_types" }, { "include": "#number_literal" }, { "include": "#string_context_c" }, { "include": "#comma" }, { "include": "#scope_resolution_inner_generated" }, { "include": "#template_call_range" }, { "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.cpp" } ] }, "1": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] }, "4": { "name": "entity.name.scope-resolution.cpp" }, "5": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "6": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "7": { "name": "entity.name.type.cpp" } } }, "type_alias": { "match": "(using)\\s*(?!namespace)(\\s*(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*((?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))\\s*(\\=)\\s*(typename)?\\s*((?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*((?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))|(.+(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*((?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))(?:\\s+|(\\s*((?:\\*\\s*)*)((?:&\\s*){0,2})\\s*))((?:::)?(?:(?:[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*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)(?|\\?\\?>)|(?=[;>\\[\\]=]))", "patterns": [ { "name": "meta.head.function.definition.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.cpp" } }, "patterns": [ { "contentName": "meta.function.definition.parameters.cpp", "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.section.parameters.begin.bracket.round.cpp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.cpp" } }, "patterns": [ { "include": "#function_parameter_context" }, { "include": "#function_call_context" } ] }, { "include": "#comments_context" }, { "include": "#root_context" } ] }, { "name": "meta.body.function.definition.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.function.definition.cpp" } }, "patterns": [ { "include": "#function_body_context" } ] }, { "name": "meta.tail.function.definition.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "#root_context" } ] } ] }, "static_assert": { "begin": "(static_assert|_Static_assert)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.other.static_assert.cpp" }, "2": { "name": "punctuation.section.arguments.begin.bracket.round.cpp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.arguments.end.bracket.round.cpp" } }, "patterns": [ { "name": "meta.static_assert.message.cpp", "begin": "(,)\\s*(?=(?:L|u8|u|U\\s*\\\")?)", "beginCaptures": { "1": { "name": "comma.cpp punctuation.separator.delimiter.cpp" } }, "end": "(?=\\))", "patterns": [ { "include": "#string_context" }, { "include": "#string_context_c" } ] }, { "include": "#function_call_context" } ] }, "function_call": { "begin": "(?!\\s)(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*))?(\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#scope_resolution_function_call_inner_generated" } ] }, "2": { "name": "entity.name.function.call.cpp" }, "3": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "4": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.cpp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.arguments.end.bracket.round.function.call.cpp" } }, "patterns": [ { "include": "#function_call_context" } ] }, "operators": { "patterns": [ { "include": "#sizeof_operator" }, { "include": "#alignof_operator" }, { "include": "#alignas_operator" }, { "include": "#typeid_operator" }, { "include": "#method_access" }, { "include": "#member_access" }, { "match": "(?>=|\\|=", "name": "keyword.operator.assignment.compound.bitwise.cpp" }, { "match": "<<|>>", "name": "keyword.operator.bitwise.shift.cpp" }, { "match": "!=|<=|>=|==|<|>", "name": "keyword.operator.comparison.cpp" }, { "match": "&&|!|\\|\\|", "name": "keyword.operator.logical.cpp" }, { "match": "&|\\||\\^|~", "name": "keyword.operator.cpp" }, { "include": "#assignment_operator" }, { "match": "%|\\*|/|-|\\+", "name": "keyword.operator.cpp" }, { "begin": "\\?", "beginCaptures": { "0": { "name": "keyword.operator.ternary.cpp" } }, "end": ":", "applyEndPatternLast": true, "endCaptures": { "0": { "name": "keyword.operator.ternary.cpp" } }, "patterns": [ { "include": "#method_access" }, { "include": "#member_access" }, { "include": "#function_call_c" }, { "include": "#root_context" } ] } ] }, "function_pointer": { "begin": "(\\s*(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*((?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))\\s*(\\s*((?:\\*\\s*)*)((?:&\\s*){0,2})\\s*)(\\()(\\*)\\s*((?:[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*(?:(\\[)(\\w*)(\\])\\s*)*(\\))\\s*(\\()", "beginCaptures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "(?:class|struct|union|enum)", "name": "storage.type.$0.cpp" }, { "include": "#function_type" }, { "include": "#storage_types" }, { "include": "#number_literal" }, { "include": "#string_context_c" }, { "include": "#comma" }, { "include": "#scope_resolution_inner_generated" }, { "include": "#template_call_range" }, { "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.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "4": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] }, "5": { "name": "entity.name.scope-resolution.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "8": { "name": "entity.name.type.cpp" }, "10": { "name": "storage.modifier.pointer.cpp" }, "11": { "name": "storage.modifier.reference.cpp" }, "12": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "13": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "14": { "name": "variable.other.definition.pointer.function.cpp" }, "15": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "16": { "patterns": [ { "include": "#evaluation_context" } ] }, "17": { "name": "punctuation.definition.end.bracket.square.cpp" }, "18": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "19": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "end": "(\\))\\s*(?=[{=,);]|\\n)(?!\\()", "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" } }, "patterns": [ { "include": "#function_parameter_context" } ] }, "probably_a_parameter": { "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})))*\\s*(?==))|((?<=\\w |\\*\\/|[&*>\\]\\)]|\\.\\.\\.)\\s*(?:[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*)?(?:,|\\)))))", "captures": { "1": { "name": "variable.parameter.defaulted.cpp" }, "2": { "name": "variable.parameter.cpp" } } }, "operator_overload": { "name": "meta.function.definition.parameters.operator-overload.cpp", "begin": "(operator)((?:\\s*(?:\\+\\+|\\-\\-|\\(\\)|\\[\\]|\\->|\\+\\+|\\-\\-|\\+|\\-|!|~|\\*|&|\\->\\*|\\*|\\/|%|\\+|\\-|<<|>>|<=>|<|<=|>|>=|==|!=|&|\\^|\\||&&|\\|\\||=|\\+=|\\-=|\\*=|\\/=|%=|<<=|>>=|&=|\\^=|\\|=|,)|\\s+(?:(?:new|new\\[\\]|delete|delete\\[\\])|(?:(?:[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*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*(?:[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*(\\()", "beginCaptures": { "1": { "name": "keyword.other.operator.overload.cpp" }, "2": { "name": "entity.name.operator.overloadee.cpp", "patterns": [ { "include": "#scope_resolution_function_definition_operator_overload_inner_generated" } ] }, "3": { "name": "punctuation.section.parameters.begin.bracket.round.operator-overload.cpp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.operator-overload.cpp" } }, "patterns": [ { "include": "#function_parameter_context" } ] }, "member_access": { "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})))*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!auto[^(?-mix:\\w)]|void[^(?-mix:\\w)]|char[^(?-mix:\\w)]|short[^(?-mix:\\w)]|int[^(?-mix:\\w)]|signed[^(?-mix:\\w)]|unsigned[^(?-mix:\\w)]|long[^(?-mix:\\w)]|float[^(?-mix:\\w)]|double[^(?-mix:\\w)]|bool[^(?-mix:\\w)]|wchar_t[^(?-mix:\\w)]|u_char[^(?-mix:\\w)]|u_short[^(?-mix:\\w)]|u_int[^(?-mix:\\w)]|u_long[^(?-mix:\\w)]|ushort[^(?-mix:\\w)]|uint[^(?-mix:\\w)]|u_quad_t[^(?-mix:\\w)]|quad_t[^(?-mix:\\w)]|qaddr_t[^(?-mix:\\w)]|caddr_t[^(?-mix:\\w)]|daddr_t[^(?-mix:\\w)]|div_t[^(?-mix:\\w)]|dev_t[^(?-mix:\\w)]|fixpt_t[^(?-mix:\\w)]|blkcnt_t[^(?-mix:\\w)]|blksize_t[^(?-mix:\\w)]|gid_t[^(?-mix:\\w)]|in_addr_t[^(?-mix:\\w)]|in_port_t[^(?-mix:\\w)]|ino_t[^(?-mix:\\w)]|key_t[^(?-mix:\\w)]|mode_t[^(?-mix:\\w)]|nlink_t[^(?-mix:\\w)]|id_t[^(?-mix:\\w)]|pid_t[^(?-mix:\\w)]|off_t[^(?-mix:\\w)]|segsz_t[^(?-mix:\\w)]|swblk_t[^(?-mix:\\w)]|uid_t[^(?-mix:\\w)]|id_t[^(?-mix:\\w)]|clock_t[^(?-mix:\\w)]|size_t[^(?-mix:\\w)]|ssize_t[^(?-mix:\\w)]|time_t[^(?-mix:\\w)]|useconds_t[^(?-mix:\\w)]|suseconds_t[^(?-mix:\\w)]|int8_t[^(?-mix:\\w)]|int16_t[^(?-mix:\\w)]|int32_t[^(?-mix:\\w)]|int64_t[^(?-mix:\\w)]|uint8_t[^(?-mix:\\w)]|uint16_t[^(?-mix:\\w)]|uint32_t[^(?-mix:\\w)]|uint64_t[^(?-mix:\\w)]|int_least8_t[^(?-mix:\\w)]|int_least16_t[^(?-mix:\\w)]|int_least32_t[^(?-mix:\\w)]|int_least64_t[^(?-mix:\\w)]|uint_least8_t[^(?-mix:\\w)]|uint_least16_t[^(?-mix:\\w)]|uint_least32_t[^(?-mix:\\w)]|uint_least64_t[^(?-mix:\\w)]|int_fast8_t[^(?-mix:\\w)]|int_fast16_t[^(?-mix:\\w)]|int_fast32_t[^(?-mix:\\w)]|int_fast64_t[^(?-mix:\\w)]|uint_fast8_t[^(?-mix:\\w)]|uint_fast16_t[^(?-mix:\\w)]|uint_fast32_t[^(?-mix:\\w)]|uint_fast64_t[^(?-mix:\\w)]|intptr_t[^(?-mix:\\w)]|uintptr_t[^(?-mix:\\w)]|intmax_t[^(?-mix:\\w)]|intmax_t[^(?-mix:\\w)]|uintmax_t[^(?-mix:\\w)]|uintmax_t[^(?-mix:\\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})))*\\b(?!\\())", "captures": { "1": { "name": "variable.language.this.cpp" }, "2": { "name": "variable.other.object.access.cpp" }, "3": { "name": "punctuation.separator.dot-access.cpp" }, "4": { "name": "punctuation.separator.pointer-access.cpp" }, "5": { "patterns": [ { "match": "(?<=(?:\\.\\*|\\.|->|->\\*))\\s*(?:((?\\*|->)))", "captures": { "1": { "name": "variable.language.this.cpp" }, "2": { "name": "variable.other.object.property.cpp" }, "3": { "name": "punctuation.separator.dot-access.cpp" }, "4": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "match": "(?:((?\\*|->)))", "captures": { "1": { "name": "variable.language.this.cpp" }, "2": { "name": "variable.other.object.access.cpp" }, "3": { "name": "punctuation.separator.dot-access.cpp" }, "4": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "include": "#member_access" }, { "include": "#method_access" } ] }, "6": { "name": "variable.other.property.cpp" } } }, "method_access": { "begin": "(?:((?\\*|->)))((?:(?:[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*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*((?:[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*(\\()", "beginCaptures": { "1": { "name": "variable.language.this.cpp" }, "2": { "name": "variable.other.object.access.cpp" }, "3": { "name": "punctuation.separator.dot-access.cpp" }, "4": { "name": "punctuation.separator.pointer-access.cpp" }, "5": { "patterns": [ { "match": "(?<=(?:\\.\\*|\\.|->|->\\*))\\s*(?:((?\\*|->)))", "captures": { "1": { "name": "variable.language.this.cpp" }, "2": { "name": "variable.other.object.property.cpp" }, "3": { "name": "punctuation.separator.dot-access.cpp" }, "4": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "match": "(?:((?\\*|->)))", "captures": { "1": { "name": "variable.language.this.cpp" }, "2": { "name": "variable.other.object.access.cpp" }, "3": { "name": "punctuation.separator.dot-access.cpp" }, "4": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "include": "#member_access" }, { "include": "#method_access" } ] }, "6": { "name": "entity.name.function.member.cpp" }, "7": { "name": "punctuation.section.arguments.begin.bracket.round.function.member.cpp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.arguments.end.bracket.round.function.member.cpp" } }, "patterns": [ { "include": "#function_call_context" } ] }, "using_namespace": { "name": "meta.using-namespace.cpp", "begin": "(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*))?((?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)\\s*((?|\\?\\?>)|(?=[;>\\[\\]=]))", "patterns": [ { "name": "meta.head.namespace.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.namespace.cpp" } }, "patterns": [ { "include": "#attributes_context" }, { "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})))*\\s*(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)\\s*((?|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.namespace.cpp" } }, "patterns": [ { "include": "#root_context" } ] }, { "name": "meta.tail.namespace.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "#root_context" } ] } ] }, "macro_argument": { "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})))*(?!\\w)", "name": "variable.other.macro.argument.cpp" }, "lambdas": { "begin": "((?:(?<=[^\\s]|^)(?])|(?<=\\Wreturn|^return))\\s*(\\[(?!\\[))((?:.*\\[.*?\\].*?)*.*?)(\\]))", "beginCaptures": { "2": { "name": "punctuation.definition.capture.begin.lambda.cpp" }, "3": { "name": "meta.lambda.capture.cpp", "patterns": [ { "include": "#function_parameter_context" } ] }, "4": { "name": "punctuation.definition.capture.end.lambda.cpp" } }, "end": "(?<=})", "patterns": [ { "name": "meta.function.definition.parameters.lambda.cpp", "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.definition.parameters.begin.lambda.cpp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.lambda.cpp" } }, "patterns": [ { "include": "#function_parameter_context" } ] }, { "match": "(?)(.+?(?=\\{|$))?", "captures": { "1": { "name": "punctuation.definition.lambda.return-type.cpp" }, "2": { "name": "storage.type.return-type.lambda.cpp" } } }, { "name": "meta.function.definition.body.lambda.cpp", "begin": "(\\{)", "beginCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.lambda.cpp" } }, "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.lambda.cpp" } }, "patterns": [ { "include": "#root_context" } ] } ] }, "pthread_types": { "match": "(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)((?:[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*((?|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "patterns": [ { "name": "meta.head.enum.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.enum.cpp" } }, "patterns": [ { "include": "#root_context" } ] }, { "name": "meta.body.enum.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.enum.cpp" } }, "patterns": [ { "include": "#enumerator_list" }, { "include": "#comments_context" }, { "include": "#comma" }, { "include": "#semicolon" } ] }, { "name": "meta.tail.enum.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "#root_context" } ] } ] }, "inhertance_context": { "patterns": [ { "match": ",", "name": "comma.cpp punctuation.separator.delimiter.inhertance.cpp" }, { "match": "(?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)(?:(?:[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*(?:(?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))", "captures": { "1": { "name": "entity.name.type.inherited.cpp" } } } ] }, "class_block": { "name": "meta.block.class.cpp", "begin": "((((?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)(?:(?:[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*(?:(?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", "beginCaptures": { "1": { "name": "meta.head.class.cpp" }, "3": { "name": "storage.type.$3.cpp" }, "4": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "5": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "6": { "name": "entity.name.type.$3.cpp" }, "7": { "name": "storage.type.modifier.final.cpp" }, "8": { "name": "colon.cpp punctuation.separator.inhertance.cpp" }, "9": { "patterns": [ { "include": "#inhertance_context" } ] } }, "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "patterns": [ { "name": "meta.head.class.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.class.cpp" } }, "patterns": [ { "include": "#preprocessor_context" }, { "include": "#inhertance_context" }, { "include": "#template_call_range" }, { "include": "#comments_context" } ] }, { "name": "meta.body.class.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.class.cpp" } }, "patterns": [ { "include": "#function_pointer" }, { "include": "#constructor_context" }, { "include": "#root_context" } ] }, { "name": "meta.tail.class.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "#root_context" } ] } ] }, "struct_block": { "name": "meta.block.struct.cpp", "begin": "((((?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)(?:(?:[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*(?:(?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", "beginCaptures": { "1": { "name": "meta.head.struct.cpp" }, "3": { "name": "storage.type.$3.cpp" }, "4": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "5": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "6": { "name": "entity.name.type.$3.cpp" }, "7": { "name": "storage.type.modifier.final.cpp" }, "8": { "name": "colon.cpp punctuation.separator.inhertance.cpp" }, "9": { "patterns": [ { "include": "#inhertance_context" } ] } }, "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "patterns": [ { "name": "meta.head.struct.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.struct.cpp" } }, "patterns": [ { "include": "#preprocessor_context" }, { "include": "#inhertance_context" }, { "include": "#template_call_range" }, { "include": "#comments_context" } ] }, { "name": "meta.body.struct.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.struct.cpp" } }, "patterns": [ { "include": "#function_pointer" }, { "include": "#constructor_context" }, { "include": "#root_context" } ] }, { "name": "meta.tail.struct.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "#root_context" } ] } ] }, "union_block": { "name": "meta.block.union.cpp", "begin": "((((?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)(?:(?:[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*(?:(?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", "beginCaptures": { "1": { "name": "meta.head.union.cpp" }, "3": { "name": "storage.type.$3.cpp" }, "4": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "5": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "6": { "name": "entity.name.type.$3.cpp" }, "7": { "name": "storage.type.modifier.final.cpp" }, "8": { "name": "colon.cpp punctuation.separator.inhertance.cpp" }, "9": { "patterns": [ { "include": "#inhertance_context" } ] } }, "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "patterns": [ { "name": "meta.head.union.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.union.cpp" } }, "patterns": [ { "include": "#preprocessor_context" }, { "include": "#inhertance_context" }, { "include": "#template_call_range" }, { "include": "#comments_context" } ] }, { "name": "meta.body.union.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.union.cpp" } }, "patterns": [ { "include": "#function_pointer" }, { "include": "#constructor_context" }, { "include": "#root_context" } ] }, { "name": "meta.tail.union.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "#root_context" } ] } ] }, "extern_block": { "name": "meta.block.extern.cpp", "begin": "((\\bextern)(?=\\s*\\\"))", "beginCaptures": { "1": { "name": "meta.head.extern.cpp" }, "2": { "name": "storage.type.extern.cpp" } }, "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "patterns": [ { "name": "meta.head.extern.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.extern.cpp" } }, "patterns": [ { "include": "#root_context" } ] }, { "name": "meta.body.extern.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.extern.cpp" } }, "patterns": [ { "include": "#root_context" } ] }, { "name": "meta.tail.extern.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "#root_context" } ] }, { "include": "#root_context" } ] }, "typedef_class": { "begin": "((?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)(?:(?:[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*(?:(?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", "beginCaptures": { "1": { "name": "meta.head.class.cpp" }, "3": { "name": "storage.type.$3.cpp" }, "4": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "5": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "6": { "name": "entity.name.type.$3.cpp" }, "7": { "name": "storage.type.modifier.final.cpp" }, "8": { "name": "colon.cpp punctuation.separator.inhertance.cpp" }, "9": { "patterns": [ { "include": "#inhertance_context" } ] } }, "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "patterns": [ { "name": "meta.head.class.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.class.cpp" } }, "patterns": [ { "include": "#preprocessor_context" }, { "include": "#inhertance_context" }, { "include": "#template_call_range" }, { "include": "#comments_context" } ] }, { "name": "meta.body.class.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.class.cpp" } }, "patterns": [ { "include": "#function_pointer" }, { "include": "#constructor_context" }, { "include": "#root_context" } ] }, { "name": "meta.tail.class.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "match": "(\\s*((?:\\*\\s*)*)((?:&\\s*){0,2})\\s*)((?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)(?:(?:[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*(?:(?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", "beginCaptures": { "1": { "name": "meta.head.struct.cpp" }, "3": { "name": "storage.type.$3.cpp" }, "4": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "5": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "6": { "name": "entity.name.type.$3.cpp" }, "7": { "name": "storage.type.modifier.final.cpp" }, "8": { "name": "colon.cpp punctuation.separator.inhertance.cpp" }, "9": { "patterns": [ { "include": "#inhertance_context" } ] } }, "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "patterns": [ { "name": "meta.head.struct.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.struct.cpp" } }, "patterns": [ { "include": "#preprocessor_context" }, { "include": "#inhertance_context" }, { "include": "#template_call_range" }, { "include": "#comments_context" } ] }, { "name": "meta.body.struct.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.struct.cpp" } }, "patterns": [ { "include": "#function_pointer" }, { "include": "#constructor_context" }, { "include": "#root_context" } ] }, { "name": "meta.tail.struct.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "match": "(\\s*((?:\\*\\s*)*)((?:&\\s*){0,2})\\s*)((?]*|[^>]*+<[^>]*+>)++>\\s*)))?::)*\\s*)(?:(?:[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*(?:(?:[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})))*)(?:(?-mix:(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", "beginCaptures": { "1": { "name": "meta.head.union.cpp" }, "3": { "name": "storage.type.$3.cpp" }, "4": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "5": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "6": { "name": "entity.name.type.$3.cpp" }, "7": { "name": "storage.type.modifier.final.cpp" }, "8": { "name": "colon.cpp punctuation.separator.inhertance.cpp" }, "9": { "patterns": [ { "include": "#inhertance_context" } ] } }, "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "patterns": [ { "name": "meta.head.union.cpp", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.union.cpp" } }, "patterns": [ { "include": "#preprocessor_context" }, { "include": "#inhertance_context" }, { "include": "#template_call_range" }, { "include": "#comments_context" } ] }, { "name": "meta.body.union.cpp", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.union.cpp" } }, "patterns": [ { "include": "#function_pointer" }, { "include": "#constructor_context" }, { "include": "#root_context" } ] }, { "name": "meta.tail.union.cpp", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "match": "(\\s*((?:\\*\\s*)*)((?:&\\s*){0,2})\\s*)((?(?:[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*~\\2|~(?>(?:[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*(\\))", "captures": { "1": { "name": "entity.name.function.destructor.cpp entity.name.function.special.destructor.cpp" }, "3": { "name": "punctuation.definition.parameters.begin.destructor.cpp" }, "4": { "name": "punctuation.definition.parameters.end.destructor.cpp" } }, "name": "meta.function.destructor.cpp" }, "meta_preprocessor_macro": { "name": "meta.preprocessor.macro.cpp", "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+\t# define\n((?(?-mix:[a-zA-Z_$][\\w$]*)))\t # macro name\n(?:\n (\\()\n\t(\n\t \\s* \\g \\s*\t\t # first argument\n\t ((,) \\s* \\g \\s*)* # additional arguments\n\t (?:\\.\\.\\.)?\t\t\t# varargs ellipsis?\n\t)\n (\\))\n)?", "beginCaptures": { "1": { "name": "keyword.control.directive.define.cpp" }, "2": { "name": "punctuation.definition.directive.cpp" }, "3": { "name": "entity.name.function.preprocessor.cpp" }, "5": { "name": "punctuation.definition.parameters.begin.cpp" }, "6": { "name": "variable.parameter.preprocessor.cpp" }, "8": { "name": "punctuation.separator.parameters.cpp" }, "9": { "name": "punctuation.definition.parameters.end.cpp" } }, "end": "(?=(?://|/\\*))|(?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.cpp" } }, "name": "string.quoted.other.lt-gt.include.cpp" } ] }, "meta_preprocessor_line": { "name": "meta.preprocessor.cpp", "begin": "^\\s*((#)\\s*line)\\b", "beginCaptures": { "1": { "name": "keyword.control.directive.line.cpp" }, "2": { "name": "punctuation.definition.directive.cpp" } }, "end": "(?=(?://|/\\*))|(?=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket", "beginCaptures": { "1": { "name": "variable.other.cpp" }, "2": { "name": "punctuation.section.parens.begin.bracket.round.initialization.cpp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.initialization.cpp" } }, "patterns": [ { "include": "#function_call_context" } ] }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.cpp" } }, "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.cpp" } }, "patterns": [ { "include": "#block_context" } ] }, { "include": "#parentheses_block" }, { "include": "#root_context" } ] }, "comments_context": { "patterns": [ { "captures": { "1": { "name": "meta.toc-list.banner.block.cpp" } }, "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?", "name": "comment.block.cpp" }, { "begin": "/\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.cpp" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.cpp" } }, "name": "comment.block.cpp" }, { "captures": { "1": { "name": "meta.toc-list.banner.line.cpp" } }, "match": "^// =(\\s*.*?)\\s*=\\s*$\\n?", "name": "comment.line.banner.cpp" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.cpp" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.cpp" } }, "end": "(?=\\n)", "name": "comment.line.double-slash.cpp", "patterns": [ { "include": "#line_continuation_character" } ] } ] } ] }, "disabled": { "begin": "^\\s*#\\s*if(n?def)?\\b.*$", "end": "^\\s*#\\s*endif\\b", "patterns": [ { "include": "#disabled" }, { "include": "#pragma_mark" } ] }, "line_continuation_character": { "match": "(\\\\)\\n", "captures": { "1": { "name": "constant.character.escape.line-continuation.cpp" } } }, "parentheses": { "name": "meta.parens.cpp", "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.cpp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.cpp" } }, "patterns": [ { "include": "#root_context" } ] }, "parentheses_block": { "name": "meta.parens.block.cpp", "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.cpp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.cpp" } }, "patterns": [ { "include": "#block_context" }, { "match": "(?-mix:(?=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", "end": "(?<=\\))(?!\\w)|(?=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.cpp" }, "2": { "name": "punctuation.section.arguments.begin.bracket.round.cpp" } }, "end": "(\\))|(?