diff --git a/README.md b/README.md index baf78d05..534588a2 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ It fixes: It adds: - Parameter highlighting +- Highlighting of embedded assembly code - Lambda highlighting - C++14 literal support (`100'000ms`) - Template definition syntax highlighting (including C++ 2020 syntax) diff --git a/language_tags/c.txt b/language_tags/c.txt index a48cb3a9..768d2d70 100644 --- a/language_tags/c.txt +++ b/language_tags/c.txt @@ -320,12 +320,15 @@ keyword.other.unit.hexadecimal.c keyword.other.unit.octal.c keyword.other.unit.suffix.floating-point.c keyword.other.unit.suffix.integer.c +meta.asm.c meta.block.c meta.block.switch.c meta.body.switch.c meta.bracket.square.access.c meta.conditional.case.c meta.conditional.switch.c +meta.embedded.assembly.c +meta.encoding.c meta.function-call.c meta.function-call.member.c meta.function.c @@ -352,7 +355,9 @@ punctuation.definition.directive.c punctuation.definition.end.bracket.square.c punctuation.definition.parameters.begin.c punctuation.definition.parameters.end.c +punctuation.definition.string.begin.assembly.c punctuation.definition.string.begin.c +punctuation.definition.string.end.assembly.c punctuation.definition.string.end.c punctuation.range-based.c punctuation.section.arguments.begin.bracket.round.c @@ -365,9 +370,13 @@ punctuation.section.block.end.bracket.curly.c punctuation.section.block.end.bracket.curly.switch.c punctuation.section.parameters.begin.bracket.round.c punctuation.section.parameters.end.bracket.round.c +punctuation.section.parens.begin.bracket.round.assembly.c +punctuation.section.parens.begin.bracket.round.assembly.inner.c punctuation.section.parens.begin.bracket.round.c punctuation.section.parens.begin.bracket.round.conditional.switch.c punctuation.section.parens.begin.bracket.round.initialization.c +punctuation.section.parens.end.bracket.round.assembly.c +punctuation.section.parens.end.bracket.round.assembly.inner.c punctuation.section.parens.end.bracket.round.c punctuation.section.parens.end.bracket.round.conditional.switch.c punctuation.section.parens.end.bracket.round.initialization.c @@ -375,6 +384,7 @@ punctuation.separator.case.c punctuation.separator.case.default.c punctuation.separator.constant.numeric punctuation.separator.delimiter.c +punctuation.separator.delimiter.colon.assembly.c punctuation.separator.dot-access.c punctuation.separator.parameters.c punctuation.separator.pointer-access.c @@ -384,6 +394,7 @@ punctuation.whitespace.comment.leading.c storage.modifier.array.bracket.square.c storage.modifier.c storage.type.$1.c +storage.type.asm.c storage.type.built-in.c storage.type.built-in.primitive.c string.quoted.double.c diff --git a/language_tags/cpp.txt b/language_tags/cpp.txt index b4d9d006..0033d8f7 100644 --- a/language_tags/cpp.txt +++ b/language_tags/cpp.txt @@ -1,4 +1,3 @@ -alias.cpp colon.cpp comma.cpp comment.block.cpp @@ -34,6 +33,7 @@ entity.name.function.special.destructor.cpp entity.name.namespace.alias.cpp entity.name.namespace.cpp entity.name.operator.overloadee.cpp +entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp entity.name.other.preprocessor.macro.predefined.NDEBUG.cpp entity.name.other.preprocessor.macro.predefined._ATL_VER.cpp entity.name.other.preprocessor.macro.predefined._CHAR_UNSIGNED.cpp @@ -292,17 +292,24 @@ entity.name.scope-resolution.function.definition.operator-overload.cpp entity.name.scope-resolution.namespace.alias.cpp entity.name.scope-resolution.namespace.block.cpp entity.name.scope-resolution.namespace.using.cpp +entity.name.scope-resolution.parameter.cpp entity.name.scope-resolution.template.call.cpp entity.name.scope-resolution.template.definition.cpp entity.name.tag.pragma-mark.cpp entity.name.type.$3.cpp entity.name.type.alias.cpp +entity.name.type.class.cpp +entity.name.type.class.parameter.cpp entity.name.type.cpp entity.name.type.enum.cpp +entity.name.type.enum.parameter.cpp entity.name.type.inherited.cpp +entity.name.type.parameter.cpp entity.name.type.struct.cpp entity.name.type.struct.parameter.cpp entity.name.type.template.cpp +entity.name.type.union.cpp +entity.name.type.union.parameter.cpp entity.other.attribute-name.pragma.preprocessor.cpp entity.other.attribute.$0.cpp invalid.illegal.constant.numeric.cpp @@ -329,6 +336,7 @@ keyword.operator.alignof.cpp keyword.operator.assignment.compound.bitwise.cpp keyword.operator.assignment.compound.cpp keyword.operator.assignment.cpp +keyword.operator.assignment.default.cpp keyword.operator.bitwise.shift.cpp keyword.operator.cast.$0.cpp keyword.operator.comparison.cpp @@ -367,12 +375,12 @@ keyword.other.unit.suffix.floating-point.cpp keyword.other.unit.suffix.integer.cpp keyword.other.unit.user-defined.cpp keyword.other.using.directive.cpp -memory.cpp meta.arguments.decltype.cpp meta.arguments.operator.alignas.cpp meta.arguments.operator.alignof.cpp meta.arguments.operator.sizeof.cpp meta.arguments.operator.typeid.cpp +meta.asm.cpp meta.block.class.cpp meta.block.cpp meta.block.enum.cpp @@ -396,6 +404,7 @@ meta.declaration.namespace.alias.cpp meta.declaration.namespace.alias.value.cpp meta.declaration.type.alias.cpp meta.declaration.type.alias.value.unknown.cpp +meta.embedded.assembly.cpp meta.encoding.cpp meta.enum.definition.cpp meta.function.constructor.cpp @@ -415,9 +424,8 @@ meta.head.namespace.cpp meta.head.struct.cpp meta.head.switch.cpp meta.head.union.cpp -meta.initialization.cpp meta.lambda.capture.cpp -meta.parens.block.cpp +meta.parameter.cpp meta.parens.cpp meta.preprocessor.cpp meta.preprocessor.diagnostic.cpp @@ -439,6 +447,7 @@ meta.template.call.cpp meta.template.definition.cpp meta.toc-list.banner.block.cpp meta.toc-list.banner.line.cpp +meta.type.cast.cpp meta.using-namespace.cpp punctuation.accessor.attribute.cpp punctuation.definition.begin.bracket.square.cpp @@ -460,7 +469,9 @@ punctuation.definition.parameters.end.constructor.cpp punctuation.definition.parameters.end.cpp punctuation.definition.parameters.end.destructor.cpp punctuation.definition.parameters.end.lambda.cpp +punctuation.definition.string.begin.assembly.cpp punctuation.definition.string.begin.cpp +punctuation.definition.string.end.assembly.cpp punctuation.definition.string.end.cpp punctuation.section.angle-brackets.begin.template.call.cpp punctuation.section.angle-brackets.end.template.call.cpp @@ -510,18 +521,22 @@ punctuation.section.parameters.begin.bracket.round.operator-overload.cpp punctuation.section.parameters.end.bracket.round.cpp punctuation.section.parameters.end.bracket.round.function.pointer.cpp punctuation.section.parameters.end.bracket.round.operator-overload.cpp +punctuation.section.parens.begin.bracket.round.assembly.cpp +punctuation.section.parens.begin.bracket.round.assembly.inner.cpp punctuation.section.parens.begin.bracket.round.conditional.switch.cpp punctuation.section.parens.begin.bracket.round.cpp punctuation.section.parens.begin.bracket.round.function.pointer.cpp -punctuation.section.parens.begin.bracket.round.initialization.cpp +punctuation.section.parens.end.bracket.round.assembly.cpp +punctuation.section.parens.end.bracket.round.assembly.inner.cpp punctuation.section.parens.end.bracket.round.conditional.switch.cpp punctuation.section.parens.end.bracket.round.cpp punctuation.section.parens.end.bracket.round.function.pointer.cpp -punctuation.section.parens.end.bracket.round.initialization.cpp punctuation.separator.attribute.cpp punctuation.separator.case.cpp punctuation.separator.case.default.cpp punctuation.separator.constant.numeric.cpp +punctuation.separator.delimiter.colon.access.control.cpp +punctuation.separator.delimiter.colon.assembly.cpp punctuation.separator.delimiter.cpp punctuation.separator.delimiter.inheritance.cpp punctuation.separator.dot-access.cpp @@ -537,6 +552,7 @@ punctuation.separator.scope-resolution.function.definition.operator-overload.cpp punctuation.separator.scope-resolution.namespace.alias.cpp punctuation.separator.scope-resolution.namespace.block.cpp punctuation.separator.scope-resolution.namespace.using.cpp +punctuation.separator.scope-resolution.parameter.cpp punctuation.separator.scope-resolution.template.call.cpp punctuation.separator.scope-resolution.template.definition.cpp punctuation.separator.template.argument.cpp @@ -552,17 +568,22 @@ storage.modifier.inline.cpp storage.modifier.lambda.$0.cpp storage.modifier.pointer.cpp storage.modifier.reference.cpp -storage.modifier.specifier.$0.cpp +storage.modifier.specifier.$5.cpp storage.modifier.specifier.functional.post-parameters.$0.cpp storage.modifier.specifier.functional.pre-parameters.$0.cpp storage.type.$0.cpp storage.type.$3.cpp +storage.type.asm.cpp storage.type.built-in.cpp storage.type.built-in.primitive.cpp +storage.type.class.declare.cpp +storage.type.class.parameter.cpp storage.type.cpp storage.type.decltype.cpp storage.type.enum.cpp +storage.type.enum.declare.cpp storage.type.enum.enum-key.$3.cpp +storage.type.enum.parameter.cpp storage.type.extern.cpp storage.type.integral.$12.cpp storage.type.modifier.access.$0.cpp @@ -579,6 +600,8 @@ storage.type.struct.parameter.cpp storage.type.template.argument.$0.cpp storage.type.template.argument.$1.cpp storage.type.template.cpp +storage.type.union.declare.cpp +storage.type.union.parameter.cpp storage.type.user-defined.cpp string.quoted.double.cpp string.quoted.double.include.cpp @@ -592,7 +615,6 @@ support.type.built-in.posix-reserved.pthread.cpp support.type.posix-reserved.cpp support.type.posix-reserved.pthread.cpp variable.language.this.cpp -variable.other.cpp variable.other.definition.pointer.function.cpp variable.other.enummember.cpp variable.other.macro.argument.cpp @@ -601,6 +623,7 @@ variable.other.object.cpp variable.other.object.declare.cpp variable.other.object.property.cpp variable.other.property.cpp +variable.parameter.capture.cpp variable.parameter.cpp variable.parameter.defaulted.cpp variable.parameter.pointer.function.cpp diff --git a/package.json b/package.json index bf6315da..06b359c0 100644 --- a/package.json +++ b/package.json @@ -3,18 +3,20 @@ "displayName": "Better Syntax", "description": "The bleeding edge of C-like syntaxes", "icon": "icon.png", - "version": "1.11.5", + "version": "1.11.7", "scripts": { "build": "ruby scripts/generate.rb", "prelint": "npm run build", "lint": "ruby scripts/lint.rb", "pretest": "npm run build", "test": "node test/source/commands/test.js", - "gen": "npm run generate-specs -- --generate-all", + "genall": "npm run generate-specs -- --generate-all", "preversion": "npm test", "version": "npm run build && git add -A syntaxes", "pregenerate-specs": "npm run build", "generate-specs": "node test/source/commands/generate-specs.js", + "gen": "npm run generate-specs -- ", + "try": "npm run test -- --show-failure-only", "sort-specs": "node test/source/commands/sort-specs.js", "prereport": "npm run build", "report": "node test/source/commands/report", @@ -47,12 +49,18 @@ { "language": "cpp", "scopeName": "source.cpp", - "path": "./syntaxes/cpp.tmLanguage.json" + "path": "./syntaxes/cpp.tmLanguage.json", + "embeddedLanguages": { + "meta.embedded.assembly.cpp": "asm" + } }, { "language": "c", "scopeName": "source.c", - "path": "./syntaxes/c.tmLanguage.json" + "path": "./syntaxes/c.tmLanguage.json", + "embeddedLanguages": { + "meta.embedded.assembly.c": "asm" + } }, { "language": "objective-cpp", diff --git a/source/languages/c/generate.rb b/source/languages/c/generate.rb index 0207be37..98b8649b 100644 --- a/source/languages/c/generate.rb +++ b/source/languages/c/generate.rb @@ -3,6 +3,7 @@ require_relative source_dir + 'repo_specific_helpers.rb' require_relative source_dir + 'shared_patterns/numeric.rb' require_relative source_dir + 'shared_patterns/predefined_macros.rb' +require_relative source_dir + 'shared_patterns/assembly.rb' require_relative './tokens.rb' @@ -30,6 +31,7 @@ :switch_statement, :switch_conditional_parentheses, :static_assert, + :backslash_escapes ] for each in import_names c_grammar[each] = @cpp_grammar[each] @@ -38,11 +40,11 @@ # # Contexts # - c_grammar[:conditional_context] = [ + c_grammar[:c_conditional_context] = [ :$initial_context, :block_innards ] - evalutation_context = [ + c_grammar[:evalutation_context] = evalutation_context = [ "#function-call-innards", "$base" ] @@ -929,9 +931,10 @@ name: "storage.type.built-in.c", }, { - match: /\b(asm|__asm__|enum|struct|union)\b/, + match: /\b(enum|struct|union)\b/, name: "storage.type.$1.c" }, + assembly_pattern().to_tag, ] }, "vararg_ellipses" => { diff --git a/source/languages/cpp/generate.rb b/source/languages/cpp/generate.rb index ff6910d8..8cc9312a 100644 --- a/source/languages/cpp/generate.rb +++ b/source/languages/cpp/generate.rb @@ -4,12 +4,18 @@ require_relative source_dir + 'shared_patterns/numeric.rb' require_relative source_dir + 'shared_patterns/trigraph_support.rb' require_relative source_dir + 'shared_patterns/predefined_macros.rb' +require_relative source_dir + 'shared_patterns/assembly.rb' +require_relative source_dir + 'shared_patterns/inline_comment.rb' +require_relative source_dir + 'shared_patterns/std_space.rb' +require_relative source_dir + 'shared_patterns/backslash_escapes.rb' require_relative './tokens.rb' # todo # fix initializer list "functions" e.g. `int a{5};` - # fix the ... inside of macros # have all patterns with keywords be dynamically generated + # add specificity to the ternary operator + # add specificity to the misc_storage_modifiers + # remove comma and colon cpp_grammar = Grammar.new( name: "C++", @@ -25,37 +31,8 @@ # # Utils # - # inline comment - cpp_grammar[:inline_comment] = inline_comment = newPattern( - match: /\/\*/, - tag_as: "comment.block punctuation.definition.comment.begin", - ).then( - match: /.+?/, - tag_as: "comment.block", - ).then( - match: /\*\//, - tag_as: "comment.block punctuation.definition.comment.end", - ) - std_space = newPattern( - # NOTE: this pattern can match 0-spaces so long as its still a word boundary - # this is the intention since things like `int/*comment*/a = 10` are valid in c++ - # this space pattern will match inline /**/ comments that do not contain newlines - match: oneOrMoreOf( - how_many_times?: :as_few_as_possible, - match: newPattern( - @spaces - ).or( - inline_comment - ).or( - @word_boundary - ), - includes: [ - :inline_comment - ] - ), - should_fully_match:["/*a comment*/", " /* with spaces */ "], - should_partial_match: ["namespace{", "( A"], - ) + cpp_grammar[:inline_comment] = inline_comment + std_space = generateStdSpace(cpp_grammar[:inline_comment]) cpp_grammar[:semicolon] = @semicolon = newPattern( match: /;/, tag_as: "punctuation.terminator.statement", @@ -79,18 +56,18 @@ tag_as: "punctuation.definition.end.bracket.square" ).maybe(@spaces) # TODO eventually move this outside of the # Utils section - ref_deref_definition_pattern = newPattern( + ref_deref_definition_pattern = maybe( should_fully_match: [ '*', '&', '**', '&&', '*&', '*& ' ], should_not_fully_match: [ '&*', '&&&' ], - match: maybe(@spaces).then( - match: zeroOrMoreOf(/\*/.maybe(@spaces)), + match: std_space.then( + match: zeroOrMoreOf(/\*/.then(std_space)), tag_as: "storage.modifier.pointer" ).then( - match: /&/.maybe(@spaces), + match: /&/.then(std_space), at_least: 0.times, at_most: 2.times, tag_as: "storage.modifier.reference" - ).maybe(@spaces) + ).then(std_space) ) functionCallGenerator = ->(repository_name:nil, match_name: nil, tag_name_as: nil, tag_content_as: nil, tag_parenthese_as: nil) do new_range = PatternRange.new( @@ -98,7 +75,7 @@ start_pattern: newPattern( match: match_name, tag_as: tag_name_as, - ).then( + ).then(std_space).then( match: /\(/, tag_as: "punctuation.section.arguments.begin.bracket.round.#{tag_parenthese_as}" ), @@ -179,36 +156,12 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: cpp_grammar[:$initial_context] = [ :source_wrapper, ] - cpp_grammar[:root_context] = [ - :struct_declare, - :special_block_context, + cpp_grammar[:ever_present_context] = [ + # preprocessor directives, which should be a part of every scope + :preprocessor_rule_enabled, + :preprocessor_rule_disabled, + :preprocessor_rule_conditional, :macro_argument, - :string_context, - :functional_specifiers_pre_parameters, - :qualifiers_and_specifiers_post_parameters, - :storage_specifiers, - :access_control_keywords, - :exception_keywords, - :static_assert, - :other_keywords, - :memory_operators, - :using_name, - :the_this_keyword, - :language_constants, - :template_isolated_definition, - :template_definition, - :misc_storage_modifiers_1, - :destructor, - :lambdas, - :preprocessor_context, - :comments_context, - :switch_statement, - :control_flow_keywords, - :assembly, - :misc_storage_modifiers_2, - :operator_overload, - :number_literal, - :string_context_c, :meta_preprocessor_macro, :meta_preprocessor_diagnostic, :meta_preprocessor_include, @@ -216,131 +169,110 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: :meta_preprocessor_line, :meta_preprocessor_undef, :meta_preprocessor_pragma, - :predefined_macros, - :operators, - :attributes_context, # this is here because it needs to be lower than :operators. TODO: once all the contexts are cleaned up, this should be put in a better spot - :block, - :parentheses, - :type_casting_operators, - :function_definition, - :function_call, - :scope_resolution_inner_generated, - :storage_types, + :hacky_fix_for_stray_directive, + # comments + :comments_context, :line_continuation_character, - :square_brackets, - :empty_square_brackets, - :semicolon, - :comma, ] - cpp_grammar[:special_block_context] = [ - # TODO: the :attributes_context probably belongs here but see issue #215 for why they were removed + cpp_grammar[:root_context] = [ + :ever_present_context, + # declarations (contains only the head of somthing) + # TODO: class pre-definition + # TODO: initializater calls + # definitions (contains a body of something) + :function_definition, + :operator_overload, + :destructor, :using_namespace, :type_alias, + :using_name, # this needs to be below type_alias :namespace_alias, :namespace_block, + :extern_block, :typedef_class, :typedef_struct, :typedef_union, + :typedef_keyword, # eventuall remove this in favor of finding a complete statements + :standard_declares, # struct/enum/union/class :class_block, :struct_block, :union_block, :enum_block, - :extern_block, + :template_isolated_definition, # TODO: template definitions should be mixed into the seperate definitions (class/struct/function, etc) + :template_definition, + :access_control_keywords, # TODO: these should only be allowed inside of class/struct (maybe namespace?) blocks + :block, # TODO: after all function definition patterns are fixed, remove this from here and put it in the function definition context + # statements + :static_assert, # it is unclear to me if static_assert can appear in the root context or not, so I'm leaving it here to be safe. https://en.cppreference.com/w/cpp/language/static_assert + :assembly, # it is unclear to me is assembly can be in the root context or not, so I'm leaving it here to be safe + + # eventually this needs to be removed + :evaluation_context ] - # this is currently just :root_context without :function_definition - cpp_grammar[:function_body_context] = [ - :type_casting_operators, - :function_call, - :struct_declare, - :special_block_context, - :macro_argument, - :string_context, - :functional_specifiers_pre_parameters, - :qualifiers_and_specifiers_post_parameters, - :storage_specifiers, - :access_control_keywords, - :exception_keywords, - :static_assert, - :other_keywords, - :memory_operators, - :using_name, - :the_this_keyword, - :language_constants, - :template_isolated_definition, - :template_definition, - :misc_storage_modifiers_1, - :destructor, - :lambdas, - :preprocessor_context, - :comments_context, - :switch_statement, - :control_flow_keywords, - :assembly, - :misc_storage_modifiers_2, - :operator_overload, - :number_literal, - :string_context_c, - :meta_preprocessor_macro, - :meta_preprocessor_diagnostic, - :meta_preprocessor_include, - :pragma_mark, - :meta_preprocessor_line, - :meta_preprocessor_undef, - :meta_preprocessor_pragma, - :operators, - :block, - :parentheses, - :type_casting_operators, - :scope_resolution_inner_generated, - :storage_types, - :line_continuation_character, - :square_brackets, - :empty_square_brackets, - :semicolon, - :comma, - ] - cpp_grammar[:preprocessor_context] = [ - :preprocessor_rule_enabled, - :preprocessor_rule_disabled, - :preprocessor_rule_conditional, - :hacky_fix_for_stray_directive, + cpp_grammar[:function_body_context] = cpp_grammar[:root_context].without( + # function bodies cant contain any of theses: + :namespace_block, + :extern_block, + :function_definition, + :operator_overload, + :destructor, + :template_isolated_definition, + :template_definition, + # this shouldn't be in root_context (it will eventually be removed), and it shouldn't really be in function body either + :evaluation_context, + ) + [ + # functions can exclusively contain theses: + # TODO: fill out all of the statements here, variable declares, assignment, etc + # control flow + :switch_statement, # needs to be above the "switch" keyword (which will eventually be removed) + # eventually, probably, the evaluation_context should be removed from here + :evaluation_context ] - cpp_grammar[:storage_types] = [ - :storage_specifiers, - :primitive_types, - :non_primitive_types, - :pthread_types, - :posix_reserved_types, - :decltype, + cpp_grammar[:evaluation_context] = [ + :ever_present_context, + # literals + :string_context, + :number_literal, + :string_context_c, + # variable-like + :method_access, # needs to be above :function_call, needs to be above operator + :member_access, + :predefined_macros, + # operators + :operators, + :memory_operators, + :wordlike_operators, + :type_casting_operators, + # keywords + :control_flow_keywords, + :exception_keywords, + :the_this_keyword, + :language_constants, + # types, modifiers, and specifiers + :qualifiers_and_specifiers_post_parameters, # TODO this needs to be integrated into the function definition pattern + :functional_specifiers_pre_parameters, # TODO: these probably need to be moved inside the function definition pattern + :storage_types, + :misc_storage_modifiers, # TODO: this pattern needs to be removed + # misc + :lambdas, + :attributes_context, # this is here because it needs to be lower than :operators. TODO: once all the contexts are cleaned up, this should be put in a better spot + :c_style_type_casting, # this probably needs to be above "parentheses" + :parentheses, + :function_call, + :scope_resolution_inner_generated, + :square_brackets, + :empty_square_brackets, + :semicolon, + :comma, ] cpp_grammar[:function_parameter_context] = [ - :parameter_struct, - :probably_a_parameter, + :decltype, + :function_pointer_parameter, + :parameter, + :over_qualified_types, :attributes_context, :comments_context, - :storage_types, - :vararg_ellipses, - :function_pointer_parameter, :comma, - # the following are a temp workaround for defaulted arguments - # e.g. aFunc(int a = 10 + 10) - :language_constants, - :number_literal, - :string_context, - :operators, - ] - # eventually this context will be more exclusive (can't have class definitons inside of an evaluation) - # but for now it just includes everything - cpp_grammar[:evaluation_context] = [ - :root_context - # function call - # number literal - # lambdas - ] - # eventually this context will be more exclusive (can't have class definitons inside of an if statement) - # but for now it just includes everything - cpp_grammar[:conditional_context] = [ - :root_context ] cpp_grammar[:template_definition_context] = [ :scope_resolution_template_definition_inner_generated, @@ -360,11 +292,19 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: :comma_in_template_argument ] cpp_grammar[:attributes_context] = [ - :cpp_attributes, - :gcc_attributes, - :ms_attributes, - :alignas_attribute, - ] + :cpp_attributes, + :gcc_attributes, + :ms_attributes, + :alignas_attribute, + ] + cpp_grammar[:storage_types] = [ + :storage_specifiers, + :primitive_types, + :non_primitive_types, + :pthread_types, + :posix_reserved_types, + :decltype, + ] # # source wrapper # @@ -458,15 +398,15 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: reference: "access_specifier" ).maybe(@spaces).then( match: /:/, - tag_as: "colon" + tag_as: "colon punctuation.separator.delimiter.colon.access.control" ), ) cpp_grammar[:exception_keywords] = newPattern( match: variableBounds[ @cpp_tokens.that(:isExceptionRelated) ], tag_as: "keyword.control.exception.$match" ) - cpp_grammar[:other_keywords] = newPattern( - match: variableBounds[ /(typedef)/ ], + cpp_grammar[:typedef_keyword] = newPattern( + match: variableBounds[ /typedef/ ], tag_as: "keyword.other.$match" ) cpp_grammar[:the_this_keyword] = the_this_keyword = newPattern( @@ -479,7 +419,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: tag_as: "keyword.operator.wordlike keyword.operator.cast.$match" ) cpp_grammar[:memory_operators] = newPattern( - tag_as: "keyword.operator.wordlike memory", + tag_as: "keyword.operator.wordlike", match: lookBehindToAvoid( @standard_character ).then( @@ -523,7 +463,8 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: match: /:/, tag_as: "colon punctuation.separator.case.default" ), - includes: [:conditional_context] + # TODO: eventually remove the c_conditional_context + includes: [:evaluation_context, :c_conditional_context] ) cpp_grammar[:case_statement] = PatternRange.new( tag_as: "meta.conditional.case", @@ -535,7 +476,8 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: match: /:/, tag_as: "colon punctuation.separator.case" ), - includes: [:conditional_context] + # TODO: eventually remove the c_conditional_context + includes: [:evaluation_context, :c_conditional_context] ) cpp_grammar[:switch_conditional_parentheses] = PatternRange.new( tag_as: "meta.conditional.switch", @@ -547,7 +489,8 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: match: /\)/, tag_as: 'punctuation.section.parens.end.bracket.round.conditional.switch' ), - includes: [ :conditional_context ] + # TODO: eventually remove the c_conditional_context + includes: [ :evaluation_context, :c_conditional_context ] ) cpp_grammar[:switch_statement] = generateBlockFinder( name: "switch", @@ -818,6 +761,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: generateScopeResolutionFinder[".namespace.alias" ,:scope_resolution_namespace_alias ] generateScopeResolutionFinder[".namespace.using" ,:scope_resolution_namespace_using ] generateScopeResolutionFinder[".namespace.block" ,:scope_resolution_namespace_block ] + generateScopeResolutionFinder[".parameter" ,:scope_resolution_parameter ] generateScopeResolutionFinder[".function.definition.operator-overload" ,:scope_resolution_function_definition_operator_overload] # @@ -826,29 +770,26 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: non_type_keywords = @cpp_tokens.that(:isWord, not(:isType), not(:isTypeCreator)) builtin_type_creators_and_specifiers = @cpp_tokens.that(:isTypeSpecifier).or(@cpp_tokens.that(:isTypeCreator)) cpp_grammar[:qualified_type] = qualified_type = newPattern( - should_fully_match: ["A","A::B","A::B::D", "unsigned char","long long int", "unsigned short int","struct a", "void"], + should_fully_match: [ "void", "A","A::B","A::B::D", "unsigned char","long long int", "unsigned short int","struct a", "void", "iterator", "original", "bore"], should_not_partial_match: ["return", "static const"], tag_as: "meta.qualified_type", - match: /\s*+/.lookAheadFor( - /\w/ - ).lookBehindToAvoid( - /\w/ - ).maybe( + match: std_space.maybe( inline_attribute - ).then(/\s*+/).zeroOrMoreOf( - builtin_type_creators_and_specifiers.then(/\s++/) + ).then(std_space).zeroOrMoreOf( + builtin_type_creators_and_specifiers.then(std_space) ).maybe( scope_resolution - ).then(/\s*+/).then( + ).then(std_space).then( + lookAheadToAvoid(non_type_keywords.then(@word_boundary)) + ).then( match: identifier, tag_as: "entity.name.type", - ).then(@word_boundary).then( - lookBehindToAvoid(non_type_keywords) - ).maybe( + ).then(@word_boundary).maybe( template_call.without_numbered_capture_groups ).lookAheadToAvoid(/[\w<:.]/), includes: [ newPattern(match: @cpp_tokens.that(:isTypeCreator), tag_as: "storage.type.$match"), + :attributes_context, :function_type, :storage_types, :number_literal, @@ -892,60 +833,50 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: array_brackets ).maybe(@spaces).then(@semicolon.or(/\n/)), ) + cpp_grammar[:c_style_type_casting] = newPattern( + tag_as: "meta.type.cast", + should_fully_match: ["(int)", "( char * )", "(a::more:: )"], + should_not_partial_match: ["foo(bar)"], + match: lookBehindToAvoid(/[\w>]/).maybe(@spaces).then( + /\(/.maybe(@spaces).then(qualified_type).then(ref_deref_definition_pattern).then(/\)/) + ).lookAheadToAvoid(maybe(@spaces).then(@semicolon)) + ) # -# Functions +# Support # - cant_be_a_function_name = @cpp_tokens.that(:isWord, not(:isPreprocessorDirective), not(:isValidFunctionName)) - avoid_invalid_function_names = lookBehindToAvoid(@standard_character).lookAheadToAvoid(maybe(@spaces).then(cant_be_a_function_name).maybe(@spaces).then(/\(/)) - look_ahead_for_function_name = lookAheadFor(variable_name_without_bounds.maybe(@spaces).maybe(inline_attribute).maybe(@spaces).then(/\(/)) - cpp_grammar[:struct_declare] = struct_declare = newPattern( - should_partial_match: [ "struct crypto_aead *tfm = crypto_aead_reqtfm(req);", "struct aegis_block blocks[AEGIS128L_STATE_BLOCKS];" ], - match: newPattern( - match: /struct/, - tag_as: "storage.type.struct.declare", - ).then(@spaces).then( - match: variable_name, - tag_as: "entity.name.type.struct", - ).maybe(@spaces).then( - ref_deref_definition_pattern.or(@spaces) - ).then( - match: variable_name, - tag_as: "variable.other.object.declare", - ) + # generally this section is for things that need a #include, (the support category) + # it will be for things such as cout, cin, vector, string, map, etc + cpp_grammar[:pthread_types] = pthread_types = newPattern( + tag_as: "support.type.posix-reserved.pthread support.type.built-in.posix-reserved.pthread", + match: variableBounds[ /pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t/ ], ) - cpp_grammar[:parameter_struct] = newPattern( - should_partial_match: [ "struct skcipher_walk *walk," ], - match: newPattern( - match: /struct/, - tag_as: "storage.type.struct.parameter", - ).then(@spaces).then( - match: variable_name, - tag_as: "entity.name.type.struct.parameter", - ).maybe(@spaces).then( - ref_deref_definition_pattern.or(@spaces) - # this is a maybe because its possible to have a type declare without an actual parameter - ).maybe( - match: variable_name, - tag_as: "variable.other.object.declare", - ).maybe(@spaces).maybe( - /\[/.maybe(@spaces).then(/\]/).maybe(@spaces), - ).lookAheadFor(/,|\)|\n/) + cpp_grammar[:posix_reserved_types] = posix_reserved_types = newPattern( + match: variableBounds[ /[a-zA-Z_]/.zeroOrMoreOf(@standard_character).then(/_t/) ], + tag_as: "support.type.posix-reserved support.type.built-in.posix-reserved" ) - + cpp_grammar[:predefined_macros] = predefinedMacros() + +# +# Functions +# + avoid_invalid_function_names = @cpp_tokens.lookBehindToAvoidWordsThat(:isWord, not(:isPreprocessorDirective), not(:isValidFunctionName)) + look_ahead_for_function_name = lookAheadFor(variable_name_without_bounds.maybe(@spaces).maybe(inline_attribute).maybe(@spaces).then(/\(/)) + cpp_grammar[:function_definition] = generateBlockFinder( name:"function.definition", tag_as:"meta.function.definition", start_pattern: newPattern( - qualified_type.then(@spaces.or(ref_deref_definition_pattern)).then( + qualified_type.then(ref_deref_definition_pattern).then( cpp_grammar[:scope_resolution_function_definition] - ).then( - avoid_invalid_function_names ).then( match: variable_name_without_bounds, tag_as: "entity.name.function.definition" - ).maybe(@spaces).lookAheadFor(/\(/) + ).then( + avoid_invalid_function_names + ).then(std_space).lookAheadFor(/\(/) ), head_includes:[ + :ever_present_context, # comments and macros PatternRange.new( tag_content_as: "meta.function.definition.parameters", start_pattern: newPattern( @@ -958,12 +889,11 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ), includes: [ :function_parameter_context, - # TODO: the function_call_context is included here as workaround for function-initializations like issue #198 + # TODO: the evaluation_context is included here as workaround for function-initializations like issue #198 # e.g. std::string ("hello"); - :function_call_context, + :evaluation_context, ] ), - :comments_context, # initial context is here for things like noexcept() # TODO: fix this pattern an make it more strict :root_context @@ -998,19 +928,19 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: :string_context_c, ] ), - :function_call_context, + :evaluation_context, ] ) # a full match example of function call would be: aNameSpace::subClassFunctionName<5>( cpp_grammar[:function_call] = PatternRange.new( - start_pattern: lookAheadToAvoid(@space).then( - avoid_invalid_function_names - ).then( + start_pattern: newPattern( cpp_grammar[:scope_resolution_function_call] ).then( match: variable_name_without_bounds, tag_as: "entity.name.function.call" - ).maybe(@spaces).maybe( + ).then( + avoid_invalid_function_names + ).then(std_space).maybe( template_call ).then( match: /\(/, @@ -1020,15 +950,15 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: match: /\)/, tag_as: "punctuation.section.arguments.end.bracket.round.function.call" ), - includes: [ :function_call_context ] + includes: [ :evaluation_context ] ) # # Operators # cpp_grammar[:operators] = [] - normal_word_operators = newPattern( + cpp_grammar[:wordlike_operators] = newPattern( match: variableBounds[ @cpp_tokens.that(:isOperator, :isWord, not(:isTypeCastingOperator), not(:isControlFlow), not(:isFunctionLike)) ], - tag_as: "keyword.operator.wordlike alias keyword.operator.$match", + tag_as: "keyword.operator.wordlike keyword.operator.$match", ) array_of_function_like_operators = @cpp_tokens.tokens.select { |each| each[:isFunctionLike] && !each[:isSpecifier] } for each in array_of_function_like_operators @@ -1041,12 +971,21 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: tag_parenthese_as: "operator.#{name}" ]) end + + cpp_grammar[:ternary_operator] = PatternRange.new( + apply_end_pattern_last: true, + start_pattern: newPattern( + match: /\?/, + tag_as: "keyword.operator.ternary", + ), + end_pattern: newPattern( + match: /:/, + tag_as: "keyword.operator.ternary" + ), + includes: cpp_grammar[:evaluation_context] + ) cpp_grammar[:operators] += [ - :method_access, - :member_access, - normal_word_operators, - :vararg_ellipses, { match: "--", name: "keyword.operator.decrement" @@ -1084,35 +1023,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: match: "%|\\*|/|-|\\+", name: "keyword.operator" }, - { - begin: "\\?", - beginCaptures: { - "0" => { - name: "keyword.operator.ternary" - } - }, - end: ":", - applyEndPatternLast: true, - endCaptures: { - "0" => { - name: "keyword.operator.ternary" - } - }, - patterns: [ - { - include: "#method_access" - }, - { - include: "#member_access" - }, - { - include: "#function_call_c" - }, - { - include: "#root_context" - } - ] - } + :ternary_operator, ] # # function pointer @@ -1120,7 +1031,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: after_declaration = maybe(@spaces).lookAheadFor(/[{=,);]|\n/).lookAheadToAvoid(/\(/) functionPointerGenerator = ->(identifier_tag) do return PatternRange.new( - start_pattern: qualified_type.maybe(@spaces).then(ref_deref_definition_pattern).then( + start_pattern: qualified_type.then(ref_deref_definition_pattern).then( match: /\(/, tag_as: "punctuation.section.parens.begin.bracket.round.function.pointer" ).then( @@ -1153,21 +1064,82 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: cpp_grammar[:function_pointer] = functionPointerGenerator["variable.other.definition.pointer.function"] cpp_grammar[:function_pointer_parameter] = functionPointerGenerator["variable.parameter.pointer.function"] # -# Probably a parameter +# Parameters # array_brackets = /\[\]/.maybe(@spaces) comma_or_closing_paraenthese = /,/.or(/\)/) stuff_after_a_parameter = maybe(@spaces).lookAheadFor(maybe(array_brackets).then(comma_or_closing_paraenthese)) - cpp_grammar[:probably_a_parameter] = newPattern( - match: newPattern( - match: variable_name_without_bounds.maybe(@spaces).lookAheadFor("="), - tag_as: "variable.parameter.defaulted" + parameter_ending = lookAheadFor(/\)/).or(cpp_grammar[:comma]) + cpp_grammar[:parameter] = PatternRange.new( + tag_as: "meta.parameter", + # it will be a type, and a type can be one of serveral things + start_pattern: newPattern( + newPattern( + cpp_grammar[:primitive_types] + ).or( + cpp_grammar[:non_primitive_types] + ).or( + cpp_grammar[:pthread_types] + ).or( + cpp_grammar[:posix_reserved_types] ).or( - match: look_behind_for_type.lookAheadToAvoid(@cpp_tokens.that(:isType)).then(variable_name_without_bounds).then(stuff_after_a_parameter), - tag_as: "variable.parameter" + cpp_grammar[:storage_specifiers] + ).or( + match: one_scope_resolution, + tag_as: "entity.name.scope-resolution.parameter", + include: [ + newPattern( + match: /::/, + tag_as: "punctuation.separator.namespace.access punctuation.separator.scope-resolution.parameter" + ) + ] + ).or( + # this is to match the ending of a decltype() + lookBehindFor(/\)/) + ).or( + match: identifier, + tag_as: "entity.name.type.parameter" ) - ) - + ), + end_pattern: parameter_ending, + includes: [ + :storage_types, + :scope_resolution_parameter_inner_generated, + :vararg_ellipses, + :function_pointer_parameter, + # tag the parameter itself + PatternRange.new( + start_pattern: newPattern( + match: newPattern( + newPattern( + match: identifier, + tag_as: "variable.parameter", + ).then(std_space).lookAheadFor(/\)|,/) + ).or( + # this is the default-value case + # its a maybe, because it could be a function pointer + maybe( + match: identifier, + tag_as: "variable.parameter.defaulted", + ).then(std_space).then( + match: /\=/, + tag_as: "keyword.operator.assignment.default" + ) + ) + ), + end_pattern: parameter_ending, + includes: [ :evaluation_context ] + ), + # tag user defined types + newPattern( + match: identifier, + tag_as: "entity.name.type.parameter" + ), + :template_call_range, + # tag the reference and dereference operator + ref_deref_definition_pattern + ] + ) # # Operator overload # @@ -1261,7 +1233,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: match: /\)/, tag_as: "punctuation.section.arguments.end.bracket.round.function.member" ), - includes: [:function_call_context], + includes: [:evaluation_context], ) # # Namespace @@ -1314,6 +1286,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: tag_as: "keyword.other.namespace.definition storage.type.namespace.definition" ), head_includes: [ + :ever_present_context, :attributes_context, cpp_grammar[:scope_resolution_namespace_block].maybe(@spaces).then( match: variable_name, @@ -1359,7 +1332,20 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: tag_as: "meta.lambda.capture", # the zeroOrMoreOf() is for other []'s that are inside of the lambda capture # this pattern is still imperfect: if someone had a string literal with ['s in it, it could fail - includes: [ :function_parameter_context ], + includes: [ + :the_this_keyword, + newPattern( + match: identifier, + tag_as: "variable.parameter.capture", + ).then(std_space).then( + lookAheadFor(/\]|\z|$/).or( + cpp_grammar[:comma] + ).or( + cpp_grammar[:assignment_operator] + ) + ), + :evaluation_context + ], ).then( match: /\]/, tag_as: "punctuation.definition.capture.end.lambda", @@ -1410,23 +1396,6 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ), ] ) - -# -# Support -# - # generally this section is for things that need a #include, (the support category) - # it will be for things such as cout, cin, vector, string, map, etc - cpp_grammar[:pthread_types] = pthread_types = newPattern( - tag_as: "support.type.posix-reserved.pthread support.type.built-in.posix-reserved.pthread", - match: variableBounds[ /pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t/ ], - ) - cpp_grammar[:posix_reserved_types] = posix_reserved_types = newPattern( - match: variableBounds[ /[a-zA-Z_]/.zeroOrMoreOf(@standard_character).then(/_t/) ], - tag_as: "support.type.posix-reserved support.type.built-in.posix-reserved" - ) - cpp_grammar[:predefined_macros] = predefinedMacros() - - # # Classes, structs, unions, enums # @@ -1528,6 +1497,9 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ).or( lookAheadFor(/{/) ) + ).maybe( + # normally macros like this wouldn't be supported, but I imagine this one is fairly common + std_space.then(match: /DLLEXPORT/, tag_as: "entity.name.other.preprocessor.macro.predefined.DLLEXPORT").then(std_space) ).maybe(inline_attribute).maybe(@spaces).maybe( match: variable_name, tag_as: "entity.name.type.$reference(storage_type)", @@ -1561,18 +1533,17 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ), ), head_includes: [ - :preprocessor_context, + :ever_present_context, # directives and comments :inheritance_context, :template_call_range, - :comments_context, ], body_includes: [ :function_pointer, :constructor_context, :root_context ], tail_includes: tail_includes ) end - cpp_grammar[:class_block] = generateClassOrStructBlockFinder["class"] + cpp_grammar[:class_block] = generateClassOrStructBlockFinder["class"] cpp_grammar[:struct_block] = generateClassOrStructBlockFinder["struct"] - cpp_grammar[:union_block] = generateClassOrStructBlockFinder["union"] + cpp_grammar[:union_block] = generateClassOrStructBlockFinder["union"] # the following is a legacy pattern, I'm not sure if it is still accurate # I have no idea why it matches a double quote cpp_grammar[:extern_block] = generateBlockFinder( @@ -1585,7 +1556,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: head_includes: [ :root_context ], secondary_includes: [ :root_context ] ) - generateTypedefClassOrStructBlockFinder =-> (name) do + generateTypedefClassOrStructBlockFinder = ->(name) do return PatternRange.new( start_pattern: newPattern( match: variableBounds[/typedef/], @@ -1603,9 +1574,63 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ] ) end - cpp_grammar[:typedef_class] = generateTypedefClassOrStructBlockFinder["class"] + cpp_grammar[:typedef_class] = generateTypedefClassOrStructBlockFinder["class"] cpp_grammar[:typedef_struct] = generateTypedefClassOrStructBlockFinder["struct"] - cpp_grammar[:typedef_union] = generateTypedefClassOrStructBlockFinder["union"] + cpp_grammar[:typedef_union] = generateTypedefClassOrStructBlockFinder["union"] + + generateDeclareFor = ->(name) do + newPattern( + should_partial_match: [ "#{name} crypto_aead *tfm = crypto_aead_reqtfm(req);", "#{name} aegis_block blocks[AEGIS128L_STATE_BLOCKS];" ], + match: newPattern( + match: /#{name}/, + tag_as: "storage.type.#{name}.declare", + ).then(std_space).then( + match: variable_name, + tag_as: "entity.name.type.#{name}", + ).then( + ref_deref_definition_pattern + ).then(std_space).then( + @cpp_tokens.lookAheadToAvoidWordsThat(:isClassInheritenceSpecifier) + ).then( + match: variable_name, + tag_as: "variable.other.object.declare", + ).then(std_space).lookAheadFor(/\S/).lookAheadToAvoid(/:/) + ) + end + cpp_grammar[:standard_declares] = [ + cpp_grammar[:struct_declare] = generateDeclareFor["struct"], + cpp_grammar[:union_declare ] = generateDeclareFor["union"], + cpp_grammar[:enum_declare ] = generateDeclareFor["enum"], + cpp_grammar[:class_declare ] = generateDeclareFor["class"], + ] + generateOverqualifiedTypeFor = ->(name) do + newPattern( + should_partial_match: [ "#{name} skcipher_walk *walk," ], + match: newPattern( + match: /#{name}/, + tag_as: "storage.type.#{name}.parameter", + ).then(std_space).then( + match: variable_name, + tag_as: "entity.name.type.#{name}.parameter", + ).then(std_space).then( + ref_deref_definition_pattern + # this is a maybe because its possible to have a type declare without an actual parameter + ).maybe( + match: variable_name, + tag_as: "variable.other.object.declare", + ).then(std_space).maybe( + /\[/.then(std_space).then(/\]/).then(std_space), + ).lookAheadFor(/,|\)|\n/) + ) + end + cpp_grammar[:over_qualified_types] = [ + cpp_grammar[:parameter_struct] = generateOverqualifiedTypeFor["struct"], + cpp_grammar[:parameter_enum ] = generateOverqualifiedTypeFor["enum"], + cpp_grammar[:parameter_union ] = generateOverqualifiedTypeFor["union"], + cpp_grammar[:parameter_class ] = generateOverqualifiedTypeFor["class"], + ] + + # # preprocessor directives # @@ -1617,6 +1642,11 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ) # +# Misc +# + cpp_grammar[:assembly] = assembly_pattern() + cpp_grammar[:backslash_escapes] = backslash_escapes() +# # Misc Legacy # cpp_grammar[:square_brackets] = { @@ -1638,7 +1668,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: }, patterns: [ { - include: "#function_call_context" + include: "#evaluation_context" } ] } @@ -1646,18 +1676,10 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: name: "storage.modifier.array.bracket.square", match: /#{lookBehindToAvoid(/delete/)}\\[\\s*\\]/ } - cpp_grammar[:assembly] = newPattern( - match: variableBounds[ /(asm|__asm__)/ ], - tag_as: "storage.type.$match" + cpp_grammar[:misc_storage_modifiers] = newPattern( + match: /\b(?:export|mutable|typename|thread_local|extern|register|restrict|static|volatile|inline)\b/, + tag_as: "storage.modifier" ) - cpp_grammar[:misc_storage_modifiers_1] = { - match: /\b(constexpr|export|mutable|typename|thread_local)\b/, - name: "storage.modifier" - } - cpp_grammar[:misc_storage_modifiers_2] = { - match: /\b(const|extern|register|restrict|static|volatile|inline)\b/, - name: "storage.modifier" - } #destructors accept no parameters cpp_grammar[:destructor] = newPattern( should_fully_match: ["~bar()", "foo::~foo()"], @@ -2000,7 +2022,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ] ), { - begin: "(u|u8|U|L)?R\"(?:([^ ()\\\\\\t]{0,16})|([^ ()\\\\\\t]*))\\(", + begin: "((?:u|u8|U|L)?R)\"(?:([^ ()\\\\\\t]{0,16})|([^ ()\\\\\\t]*))\\(", beginCaptures: { "0" => { name: "punctuation.definition.string.begin" @@ -2024,79 +2046,18 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: name: "string.quoted.double.raw" } ] - cpp_grammar[:block] = { - begin: "{", - beginCaptures: { - "0" => { - name: "punctuation.section.block.begin.bracket.curly" - } - }, - end: "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", - endCaptures: { - "0" => { - name: "punctuation.section.block.end.bracket.curly" - } - }, - name: "meta.block", - patterns: [ - { - include: "#block_context" - } - ] - } - cpp_grammar[:block_context] = [ - :preprocessor_rule_enabled_block, - :preprocessor_rule_disabled_block, - :preprocessor_rule_conditional_block, - :method_access, - :member_access, - :type_casting_operators, - :function_call, - { - name: "meta.initialization", - begin: "(?x)\n(?:\n (?:\n\t(?=\\s)(?=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket", - beginCaptures: { - "1" => { - name: "variable.other" - }, - "2" => { - name: "punctuation.section.parens.begin.bracket.round.initialization" - } - }, - end: "\\)", - endCaptures: { - "0" => { - name: "punctuation.section.parens.end.bracket.round.initialization" - } - }, - patterns: [ - { - include: "#function_call_context" - } - ] - }, - { - begin: "{", - beginCaptures: { - "0" => { - name: "punctuation.section.block.begin.bracket.curly" - } - }, - end: "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", - endCaptures: { - "0" => { - name: "punctuation.section.block.end.bracket.curly" - } - }, - patterns: [ - { - include: "#block_context" - } - ] - }, - :parentheses_block, - :root_context - ] + cpp_grammar[:block] = PatternRange.new( + tag_as: "meta.block", + start_pattern: newPattern( + match: /{/, + tag_as: "punctuation.section.block.begin.bracket.curly" + ), + end_pattern: newPattern( + match: /}|(?=\s*#\s*(?:elif|else|endif)\b)/, + tag_as: "punctuation.section.block.end.bracket.curly" + ), + includes: [:function_body_context] + ) cpp_grammar[:comments_context] = { patterns: [ { @@ -2195,32 +2156,18 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: } }, patterns: [ + # for whenever there is a typecast { - include: "#root_context" - } - ] - } - cpp_grammar[:parentheses_block] = { - name: "meta.parens.block", - begin: "\\(", - beginCaptures: { - "0" => { - name: "punctuation.section.parens.begin.bracket.round" - } - }, - end: "\\)", - endCaptures: { - "0" => { - name: "punctuation.section.parens.end.bracket.round" - } - }, - patterns: [ - { - include: "#block_context" + include: "#over_qualified_types", }, + # for whenever there is a range based for loop { match: lookBehindToAvoid(/:/).then(/:/).lookAheadToAvoid(/:/), name: "colon punctuation.separator.range-based" + }, + # for normal prescedence usage + { + include: "#evaluation_context" } ] } @@ -2291,10 +2238,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: } ] cpp_grammar[:string_escapes_context_c] = [ - { - match: "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", - name: "constant.character.escape" - }, + :backslash_escapes, { match: "\\\\.", name: "invalid.illegal.unknown-escape" @@ -2450,7 +2394,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ] }, { - include: "#block_context" + include: "#root_context" } ] } @@ -2679,7 +2623,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ] }, { - include: "#block_context" + include: "#root_context" } ] }, @@ -2934,7 +2878,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: end: "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", patterns: [ { - include: "#block_context" + include: "#root_context" } ] } @@ -3109,7 +3053,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: ] }, { - include: "#block_context" + include: "#root_context" } ] } @@ -3151,7 +3095,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: end: "(?=^\\s*((#)\\s*endif\\b))", patterns: [ { - include: "#block_context" + include: "#root_context" } ] } @@ -3190,7 +3134,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: name: "punctuation.section.parens.end.bracket.round" }, { - begin: "(?x)\n(?!(?:while|for|do|if|else|switch|catch|return|typeid|alignof|alignas|sizeof|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()\n(?=\n (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n |\n (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + begin: "(?x)\n(?=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", end: "(?<=\\))(?!\\w)|(?=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", + begin: "(?x)\n(?=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", beginCaptures: { "1" => { - name: "keyword.operator.wordlike memory keyword.operator.new" + name: "keyword.operator.wordlike keyword.operator.new" }, "2" => { patterns: [ @@ -3301,7 +3243,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: }, patterns: [ { - include: "#function_call_context" + include: "#evaluation_context" } ] } @@ -3355,47 +3297,7 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: }, :preprocessor_rule_define_line_context ] - cpp_grammar[:function_call_context] = [ - :struct_declare, - :string_context, - :functional_specifiers_pre_parameters, - :qualifiers_and_specifiers_post_parameters, - :storage_specifiers, - :access_control_keywords, - :exception_keywords, - :static_assert, - :other_keywords, - :memory_operators, - :the_this_keyword, - :language_constants, - :misc_storage_modifiers_1, - :lambdas, - :preprocessor_context, - :comments_context, - :misc_storage_modifiers_2, - :number_literal, - :string_context_c, - :meta_preprocessor_macro, - :meta_preprocessor_diagnostic, - :meta_preprocessor_include, - :pragma_mark, - :meta_preprocessor_line, - :meta_preprocessor_undef, - :meta_preprocessor_pragma, - :predefined_macros, - :operators, - :attributes_context, # this is here because it needs to be lower than :operators. TODO: once all the contexts are cleaned up, this should be put in a better spot - :parentheses, - :type_casting_operators, - :function_call, - :scope_resolution_inner_generated, - :storage_types, - :line_continuation_character, - :square_brackets, - :empty_square_brackets, - :semicolon, - :comma, - ] + # Save @syntax_location = saveGrammar(cpp_grammar) diff --git a/source/languages/cpp/theme_demo.cpp b/source/languages/cpp/theme_demo.cpp new file mode 100644 index 00000000..e8c7a69f --- /dev/null +++ b/source/languages/cpp/theme_demo.cpp @@ -0,0 +1,43 @@ +#define show(argument) cout << #argument << "\n"; + +using namespace std; + +int func(Ret (*a_func_ptr)(Args...)) { + auto a = 0xabcdefyards; + auto c = 0'1'2'3'4; + a_pointer.thread->*thing; + a_pointer.*thread->thing; + a_pointer->thread.*thing; + a_pointer->*thread.thing; +} + +// attributes in main scope +[[gnu::hot]] [[gnu::const]] [[nodiscard]] +inline int f(); + +Item operator+( const string& base , const int& repetitions ) {}; +Item operator-( const int& the_input , const Item& input_item ) {}; +Item operator/( const Item& input_item , const int& the_input ) {}; +Item operator^( const Item& input_item , const int& the_input ) {}; + +enum enum1 + { + // comment + definition /* block comment */, definition3 + definition, definition2 // comment + } + +int main() { + // standard inline assembly + asm( + "movq $60, %rax\n\t" // the exit syscall number on Linux + "movq $2, %rdi\n\t" // this program returns 2 + ); + // lambda functions + auto a_lambda = [ a, b, c ] (Args... args, int thing1) -> Ret + { + cout << "hello"; + }; + // templated function calls + auto thing = aFunction(arguments); +} \ No newline at end of file diff --git a/source/languages/cpp/tokens.rb b/source/languages/cpp/tokens.rb index a0142581..a18045cb 100644 --- a/source/languages/cpp/tokens.rb +++ b/source/languages/cpp/tokens.rb @@ -206,8 +206,8 @@ { representation: "friend" , name: "friend" , isSpecifier: true , isFunctionSpecifier: true}, { representation: "explicit" , name: "explicit" , isSpecifier: true , isFunctionSpecifier: true}, { representation: "virtual" , name: "virtual" , isSpecifier: true , isFunctionSpecifier: true, isInheritanceSpecifier: true }, - { representation: "final" , name: "final" , functionQualifier: true, canAppearAfterParametersBeforeBody: true , isValidFunctionName: true}, - { representation: "override" , name: "override" , functionQualifier: true, canAppearAfterParametersBeforeBody: true , isValidFunctionName: true}, + { representation: "final" , name: "final" , functionQualifier: true, canAppearAfterParametersBeforeBody: true , isValidFunctionName: true, isClassInheritenceSpecifier: true}, + { representation: "override" , name: "override" , functionQualifier: true, canAppearAfterParametersBeforeBody: true , isValidFunctionName: true, isClassInheritenceSpecifier: true}, { representation: "volatile" , name: "volatile" , functionQualifier: true, canAppearAfterParametersBeforeBody: true }, { representation: "const" , name: "const" , functionQualifier: true, canAppearAfterParametersBeforeBody: true }, { representation: "noexcept" , name: "noexcept" , isSpecifier: true , canAppearAfterParametersBeforeBody: true }, diff --git a/source/shared_patterns/assembly.rb b/source/shared_patterns/assembly.rb new file mode 100644 index 00000000..418a321c --- /dev/null +++ b/source/shared_patterns/assembly.rb @@ -0,0 +1,66 @@ +def assembly_pattern() + return PatternRange.new( + tag_as: "meta.asm", + start_pattern: newPattern( + match: /\b(?:__asm__|asm)\b/, + tag_as: "storage.type.asm", + ).maybe(@spaces).maybe( + match: /volatile/, + tag_as: "storage.modifier" + ).maybe(@spaces).then( + match: /\(/, + tag_as: "punctuation.section.parens.begin.bracket.round.assembly", + ), + end_pattern: newPattern( + match: /\)/, + tag_as: "punctuation.section.parens.end.bracket.round.assembly" + ), + includes: [ + PatternRange.new( + start_pattern: maybe( + match: /R/, + tag_as: "meta.encoding" # this is a temp name and should be improved once strings are improved + ).then( + match: /"/, + tag_as: "punctuation.definition.string.begin.assembly" + ), + end_pattern: newPattern(match: /"/, tag_as: "punctuation.definition.string.end.assembly"), + tag_as: "string.quoted.double", + tag_content_as: "meta.embedded.assembly", + includes: [ + "source.asm", + "source.x86", + "source.x86_64", + "source.arm", + :backslash_escapes, + :string_escaped_char, + # this is needed because, when a pattern's includes consists entirely of unresolved includes, + # the pattern's tags are not applied. + # The overall effect is that when the user has no assembly grammar, instead + # of seeing a string as before, the user sees unstyled text. + # This dummy pattern prevents that + lookAheadFor(/not/).then(/possible/) + ] + ), + PatternRange.new( + start_pattern: newPattern( + match: /\(/, + tag_as: "punctuation.section.parens.begin.bracket.round.assembly.inner", + ), + end_pattern: newPattern( + match: /\)/, + tag_as: "punctuation.section.parens.end.bracket.round.assembly.inner" + ), + includes: [ + :evaluation_context + ] + ), + newPattern( + match: /:/, + tag_as: "punctuation.separator.delimiter.colon.assembly", + ), + :comments_context, + :comments, + ] + ) +end \ No newline at end of file diff --git a/source/shared_patterns/backslash_escapes.rb b/source/shared_patterns/backslash_escapes.rb new file mode 100644 index 00000000..8aad0074 --- /dev/null +++ b/source/shared_patterns/backslash_escapes.rb @@ -0,0 +1,6 @@ +def backslash_escapes + { + match: "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", + name: "constant.character.escape" + } +end diff --git a/source/shared_patterns/inline_comment.rb b/source/shared_patterns/inline_comment.rb new file mode 100644 index 00000000..35bea937 --- /dev/null +++ b/source/shared_patterns/inline_comment.rb @@ -0,0 +1,12 @@ +def inline_comment() + newPattern( + match: /\/\*/, + tag_as: "comment.block punctuation.definition.comment.begin", + ).then( + match: /.+?/, + tag_as: "comment.block", + ).then( + match: /\*\//, + tag_as: "comment.block punctuation.definition.comment.end", + ) +end \ No newline at end of file diff --git a/source/shared_patterns/std_space.rb b/source/shared_patterns/std_space.rb new file mode 100644 index 00000000..3b8cccc4 --- /dev/null +++ b/source/shared_patterns/std_space.rb @@ -0,0 +1,30 @@ +def generateStdSpace(inline_comment) + newPattern( + # NOTE: this pattern can match 0-spaces so long as its still a word boundary + # this is the intention since things like `int/*comment*/a = 10` are valid in c++ + # this space pattern will match inline /**/ comments that do not contain newlines + # >0 length match + match: newPattern( + at_least: 1, + quantity_preference: :as_few_as_possible, + match: newPattern( + match: @spaces, + dont_back_track?: true + ).or( + inline_comment + ) + # zero length match + ).or( + /\b/.or( + lookBehindFor(/\W/) + ).or( + lookAheadFor(/\W/) + ).or( + @start_of_document + ).or( + @end_of_document + ) + ), + includes: [ inline_comment ], + ) +end \ No newline at end of file diff --git a/source/textmate_tools.rb b/source/textmate_tools.rb index 81d5fc74..74acdc7d 100644 --- a/source/textmate_tools.rb +++ b/source/textmate_tools.rb @@ -12,6 +12,31 @@ # add optimizations # add check for seeing if the last pattern was an OR with no attributes. if it was then change (a|(b|c)) to (a|b|c) # add a "is alreadly a group" flag to prevent double wrapping +def checkForMatchingOuter(str, start_char, end_char) + # must start and end with correct chars + if str.length > 2 && str[0] == start_char && str[-1] == end_char + # remove the first and last character + str = str.chars + str.shift() + str.pop() + + depth = 0 + for each in str + # for every open brace, 1 closed brace is allowed + if each == start_char + depth += 1 + elsif each == end_char + depth -= 1 + end + # if theres a closed brace before an open brace, then the outer ones dont match + if depth == -1 + return false + end + end + return true + end + return false +end class Grammar attr_accessor :data, :all_tags, :language_ending @@ -577,7 +602,7 @@ def without_numbered_capture_groups # unescaped ('s can exist in character classes, and character class-style code can exist inside comments. # this removes the comments, then finds the character classes: escapes the ('s inside the character classes then # reverse the string so that varaible-length lookaheads can be used instead of fixed length lookbehinds - as_string_reverse = self.to_s.reverse + as_string_reverse = self.without_default_mode_modifiers.reverse no_preceding_escape = /(?=(?:(?:\\\\)*)(?:[^\\]|\z))/ reverse_character_class_match = /(\]#{no_preceding_escape}[\s\S]*?\[#{no_preceding_escape})/ reverse_comment_match = /(\)#{no_preceding_escape}[^\)]*#\?\(#{no_preceding_escape})/ @@ -598,6 +623,104 @@ def without_numbered_capture_groups return Regexp.new(reversed_but_fixed.reverse) end + def getQuantifierFromAttributes(option_attributes) + # by default assume no + quantifier = "" + # + # Simplify the quantity down to just :at_least and :at_most + # + attributes_clone = option_attributes.clone + # convert Enumerators to numbers + for each in [:at_least, :at_most, :how_many_times?] + if attributes_clone[each].is_a?(Enumerator) + attributes_clone[each] = attributes_clone[each].size + end + end + # extract the data + at_least = attributes_clone[:at_least] + at_most = attributes_clone[:at_most] + how_many_times = attributes_clone[:how_many_times?] + # simplify to at_least and at_most + if how_many_times.is_a?(Integer) + at_least = at_most = how_many_times + end + # + # Generate the ending based on :at_least and :at_most + # + # if there is no at_least, at_most, or how_many_times, then theres no quantifier + if at_least == nil and at_most == nil + quantifier = "" + # if there is a quantifier + else + # if there's no at_least, then assume at_least = 1 + if at_least == nil + at_least = 1 + end + # this is just a different way of "zeroOrMoreOf" + if at_least == 0 and at_most == nil + quantifier = "*" + # this is just a different way of "oneOrMoreOf" + elsif at_least == 1 and at_most == nil + quantifier = "+" + # if it is more complicated than that, just use a range + else + quantifier = "{#{at_least},#{at_most}}" + end + end + return quantifier + end + + def self.checkForSingleEntity(regex) + # unwrap the regex + regex_as_string = regex.without_numbered_capture_groups.without_default_mode_modifiers + debug = (regex_as_string =~ /[\s\S]*\+[\s\S]*/) && regex_as_string.length < 10 && regex_as_string != "\\s+" + # remove all escaped characters + regex_as_string.gsub!(/\\./, "a") + # remove any ()'s or ['s in the character classes, and replace them with "a" + regex_as_string.gsub!(/\[[^\]]+\]/) do |match| + clean_char_class = match[1..-2].gsub(/\[/, "a").gsub(/\(/,"a").gsub(/\)/, "a") + match[0] + clean_char_class + match[-1] + end + + # extract the ending quantifiers + zero_or_more = /\*/ + one_or_more = /\+/ + maybe = /\?/ + range = /\{(?:\d+\,\d*|\d*,\d+|\d)\}/ + greedy = /\??/ + possessive = /\+?/ + quantifier = /(?:#{zero_or_more}|#{one_or_more}|#{maybe}|#{range})/ + quantified_ending_pattern = /#{quantifier}#{possessive}#{greedy}\Z/ + quantified_ending = "" + regex_without_quantifier = regex_as_string.gsub(quantified_ending_pattern) do |match| + quantified_ending = match + "" # remove the ending + end + + # regex without the ending + main_group = regex.without_default_mode_modifiers + # remove the quantified ending + main_group = main_group[0..-(quantified_ending.length + 1)] + + entity = nil + # if its a single character + if regex_without_quantifier.length == 1 + entity = :single_char + # if its a single escaped character + elsif regex_without_quantifier.length == 2 && regex_without_quantifier[0] == "\\" + entity = :single_escaped_char + # if it has matching ()'s + elsif checkForMatchingOuter(regex_without_quantifier, "(", ")") + entity = :group + # if it has matching []'s + elsif checkForMatchingOuter(regex_without_quantifier, "[", "]") + entity = :character_class + end + + + return [entity, quantified_ending, main_group] + end + def processRegexOperator(arguments, operator) # first parse the arguments other_regex, pattern_attributes = Regexp.processGrammarArguments(arguments, operator) @@ -610,111 +733,90 @@ def processRegexOperator(arguments, operator) option_attributes.delete_if { |k, v| @@textmate_attributes.key? k } no_attributes = pattern_attributes == {} - - # - # Create the new regex - # + add_capture_group = ! no_attributes + self_as_string = self.without_default_mode_modifiers other_regex_as_string = other_regex.without_default_mode_modifiers - case operator - when 'then' - if option_attributes[:how_many_times?] or option_attributes[:at_most] or option_attributes[:at_least] - # repeat pattern - - # support for at_least: 1.times, at_most: 2.times - at_least = (option_attributes[:at_least].is_a? Enumerator) ? option_attributes[:at_least].size : option_attributes[:at_least] - at_most = (option_attributes[:at_most].is_a? Enumerator) ? option_attributes[:at_most].size : option_attributes[:at_most] - # support how_many_times?: 5 - if option_attributes[:how_many_times?].is_a? Enumerator - at_least = at_most = option_attributes[:how_many_times?].size - elsif option_attributes[:how_many_times?].is_a? Integer - at_least = at_most = option_attributes[:how_many_times?] - end - - if at_least == 0 and at_most == nil - # rewrite to zeroOrMoreOf - return self.processRegexOperator(arguments, 'zeroOrMoreOf') - elsif at_least == nil and at_most == nil - # rewrite to oneOrMoreOf - return self.processRegexOperator(arguments, 'oneOrMoreOf') - else - if at_least == nil - at_least = 1 - end - # custom range - new_regex = /#{self_as_string}((?:#{other_regex_as_string}){#{at_least},#{at_most}})/ - if no_attributes - new_regex = /#{self_as_string}(?:#{other_regex_as_string}){#{at_least},#{at_most}}/ + + # compute the endings so the operators can use/handle them + simple_quantifier_ending = self.getQuantifierFromAttributes(option_attributes) + + # create a helper to handle common logic + groupWrap = ->(regex_as_string) do + # if there is a simple_quantifier_ending + if simple_quantifier_ending.length > 0 + non_capture_group_is_needed = true + # + # perform optimizations + # + single_entity_type, existing_ending, regex_without_quantifier = Regexp.checkForSingleEntity(/#{regex_as_string}/) + # if there is a single entity + if single_entity_type != nil + # if there is only one + regex_as_string = regex_without_quantifier + # if adding an optional condition to a one-or-more, optimize it into a zero-or more + if existing_ending == "+" && simple_quantifier_ending == "?" + existing_ending = "" + simple_quantifier_ending = "*" end end - elsif option_attributes[:dont_back_track?] - # atomic groups - option_attributes.delete(:dont_back_track?) - new_regex = /#{self_as_string}((?>#{other_regex_as_string}))/ - if no_attributes - new_regex = /#{self_as_string}(?>#{other_regex_as_string})/ - end - elsif - # plain pattern - new_regex = /#{self_as_string}(#{other_regex_as_string})/ - if no_attributes - new_regex = /#{self_as_string}#{other_regex_as_string}/ - end - end - when 'or' - new_regex = /(?:#{self_as_string}|(#{other_regex_as_string}))/ - if no_attributes - # the extra (?:(?:)) groups are because ruby will auto-optimize away the outer most one, even if only one is given - # TODO eventually there should be a better optimization for this - new_regex = /(?:#{self_as_string}|#{other_regex_as_string})/ - end - when 'maybe' - # this one is more complicated because it contains an optimization - # inefficient (but straightforward way): maybe(/a+/) == /(?:a+)?/ - # efficient (but more complicated way): maybe(/a+/) == /a*/ - # (both forms are functionally equivlent) - # the following code implements the more efficient way for single character matches - is_an_escaped_character_with_one_or_more_quantifier = ((other_regex_as_string.size == 3) and (other_regex_as_string[0] == "\\") and (other_regex_as_string[-1] == "+")) - is_a_normal_character_with_one_or_more_quantifier = ((other_regex_as_string.size == 2) and (other_regex_as_string[0] != "\\") and (other_regex_as_string[-1] == "+")) - if is_an_escaped_character_with_one_or_more_quantifier or is_a_normal_character_with_one_or_more_quantifier - # replace the last + with a * - optimized_regex_as_string = other_regex_as_string.gsub(/\+\z/, '*') - new_regex = /#{self_as_string}(#{optimized_regex_as_string})/ - if no_attributes - new_regex = /#{self_as_string}#{optimized_regex_as_string}/ + # + # Handle greedy/non-greedy endings + # + if option_attributes[:quantity_preference] == :as_few_as_possible + # add the non-greedy quantifier + simple_quantifier_ending += "?" + # raise an error for an invalid option + elsif option_attributes[:quantity_preference] != nil && option_attributes[:quantity_preference] != :as_many_as_possible + raise "\n\nquantity_preference: #{option_attributes[:quantity_preference]}\nis an invalid value. Valid values are:\nnil, :as_few_as_possible, :as_many_as_possible" end + # if the group is not a single entity + if single_entity_type == nil + # wrap the regex in a non-capture group, and then give it a quantity + regex_as_string = "(?:#{regex_as_string})"+simple_quantifier_ending + # if the group is a single entity, then there is no need to wrap it else - new_regex = /#{self_as_string}(#{other_regex_as_string})?/ - if no_attributes - new_regex = /#{self_as_string}(?:#{other_regex_as_string})?/ - end - end - when 'oneOrMoreOf' - new_regex = /#{self_as_string}((?:#{other_regex_as_string})+)/ - if no_attributes - new_regex = /#{self_as_string}(?:#{other_regex_as_string})+/ - end - when 'zeroOrMoreOf' - new_regex = /#{self_as_string}((?:#{other_regex_as_string})*)/ - if no_attributes - new_regex = /#{self_as_string}(?:#{other_regex_as_string})*/ + regex_as_string = regex_as_string + simple_quantifier_ending end + end + # if backtracking isn't allowed, then wrap it in an atomic group + if option_attributes[:dont_back_track?] + regex_as_string = "(?>#{regex_as_string})" + end + # if it should be wrapped in a capture group, then add the capture group + if add_capture_group + regex_as_string = "(#{regex_as_string})" + end + regex_as_string end - if option_attributes[:dont_back_track?] - new_regex_as_string = new_regex.without_default_mode_modifiers - index = new_regex_as_string[-1] == ')' ? -2 : -1 - if not /[+*?]/ =~ new_regex_as_string[index] - raise "\n\n :dont_back_track? is not a vlid option for #{operator}\npattern is #{new_regex_as_string}" + # + # Set quantifiers + # + if ['maybe', 'oneOrMoreOf', 'zeroOrMoreOf'].include?(operator) + # then don't allow manual quantification + if simple_quantifier_ending.length > 0 + raise "\n\nSorry you can't use how_many_times?:, at_least:, or at_most with the #{operator}() function" end - new_regex = /#{new_regex_as_string.insert(index, '+')}/ - elsif option_attributes[:how_many_times?] == :as_few_as_possible - new_regex_as_string = new_regex.without_default_mode_modifiers - index = new_regex_as_string[-1] == ')' ? -2 : -1 - if not /[+*}?]/ =~ new_regex_as_string[index] - raise "\n\n :how_many_times? is not a vlid option for #{operator}\npattern is #{new_regex_as_string}" + # set the quantifier (which will be applied inside of groupWrap[]) + case operator + when 'maybe' + simple_quantifier_ending = "?" + when 'oneOrMoreOf' + simple_quantifier_ending = "+" + when 'zeroOrMoreOf' + simple_quantifier_ending = "*" end - new_regex = /#{new_regex_as_string.insert(index, '?')}/ + end + + # + # Generate the core regex + # + if operator == 'or' + new_regex = /(?:#{self_as_string}|#{groupWrap[other_regex_as_string]})/ + # if its any other operator (including the quantifiers) + else + new_regex = /#{self_as_string}#{groupWrap[other_regex_as_string]}/ end # @@ -825,6 +927,8 @@ def without_default_mode_modifiers() @word_boundary = /\b/ @white_space_start_boundary = /(?<=\s)(?=\S)/ @white_space_end_boundary = /(?<=\S)(?=\s)/ +@start_of_document = /\A/ +@end_of_document = /\Z/ # # Helper patterns @@ -1046,8 +1150,28 @@ def representationsThat(*adjectives) return matches.map do |each| each[:representation] end end + def lookBehindToAvoidWordsThat(*adjectives) + array_of_invalid_names = self.representationsThat(*adjectives) + return /\b/.lookBehindToAvoid(/#{array_of_invalid_names.map { |each| '\W'+each+'|^'+each } .join('|')}/) + end + + def lookAheadToAvoidWordsThat(*adjectives) + array_of_invalid_names = self.representationsThat(*adjectives) + return /\b/.lookAheadToAvoid(/#{array_of_invalid_names.map { |each| each+'\W|'+each+'\$' } .join('|')}/) + end + def that(*adjectives) matches = tokensThat(*adjectives) return /(?:#{matches.map {|each| Regexp.escape(each[:representation]) }.join("|")})/ end end + +class Array + def without(*args) + copy = self.clone + for each in args + copy.delete(each) + end + return copy + end +end \ No newline at end of file diff --git a/source/theme_adjectives.yaml b/source/theme_adjectives.yaml new file mode 100644 index 00000000..d2ba31cb --- /dev/null +++ b/source/theme_adjectives.yaml @@ -0,0 +1,48 @@ +adjective_modifiers: # words that are combinded with the adjectives to make theme-making easier + - "relatedTo:" # ex: the ()'s in a function call are not "the function" but they are relatedTo the function + - "like:" # ex: a macro with arguments is not a function, but for theming purposes, it is like a function + - "name:" # ex: when you want to set the color of something very very specific, like only color the "if" keyword +1st_level_adjectives: # the main topics that are mixed with many things + - literal # numbers, strings, true, false etc + - symbol # e.g. the quotes in a string, or the backslashes or # in a comment + - identifier # anything that is a name (aka not symbols), this includes keywords, and does not include operators + - keyword # a word that is special in some way. There can be keyword functions, keyword variables, keyword literals, keyword operators, etc + - operator # a symbol or word, that performs computation (similar to a function), but does not have ()'s + - punctuation # e.g. ; or , it is a symbol that is used by the parser to understand the code, but doesn't do/cause computation at run time + - comment + - function # an identifier that can be called/run/executed + - variable # an identifier that can contain data +2nd_level_ajectives: # more fine tune details + - modifier # something that is used to change the way something else works, e.g. async, const, mutable. Most modifiers are also keywords + - call # any time something is being used rather than defined, a class-call would be considered + - definition # e.g. function-definition, class-definition, variable-definition, only applies in languages where a seperate definition is needed + - member # belongs to a object/class, e.g. a function-member, a variable-member + - control_flow # is related to non-linear flow, e.g. jumping around in the code: if, else, while, for, break, try, catch, goto + - type # the name of the class/category that a variable belongs too, e.g. string, float, double, array + - unit # something that is appended/connected to a literal number to add (things can be both a unit and a type) + - builtin # something that could be user defined, but in this case is already defined by the language + - exception # is related to catching/handling errors +sub_categories: # these are typically only show up in combination with another adjective + # variables + - constant # whenever the value of the variable cant be changed + - self_reference # e.g. this/self + - enumeration # a word that is a constant number + - parameter # the variable is one of the arguments in a function definition + # literals + - non_value # ex: null, undefined, nil, None, nullptr, etc + - boolean # true/false, yes/no, on/off + - numeric # a mathematical number + - string # some form of text + - escape_sequence # text that will get converted into something else + # operators + - assignment # changing the value of an existing variable + - comparision # a kind of operator + # + + + +# Examples: + # to color the "0x" in "0x00001", use {"literal", "numeric", "modifier"} +# TODO: add more examples +# TODO: add all of the hyper-specific things +# TODO: add more adjectives for css, latex, html, and markdown \ No newline at end of file diff --git a/source/theme_maker.rb b/source/theme_maker.rb new file mode 100644 index 00000000..233e288b --- /dev/null +++ b/source/theme_maker.rb @@ -0,0 +1,31 @@ +# pseudocode for a tool that helps make themes + + +theme = { + name: "blah", + variation: :dark, + color_palette: { + bright_red: "#ff5572", + blue: "#82AAFF", + }, + least_to_most_important_rules: [ + # highest priority last (things at the bottom over) + { color: :bright_red, if: :operator and :assignment } + { color: :blue, if: :function } + ] +} + + +# how the code will work + # create a Hash called "all_remaining_tm_scopes" + # for each tm scope + # set the key to be the scope itself (the string) + # open the language specific mapping (a set that is provided for each scope) + # set the value to the that set + # iterate over each rule from bottom (last) to top + # find all the scopes that match the "if:" + # remove those from the "all_remaining_tm_scopes" + # store the scopes on that rule + # on export + # iterate over each rule and create the traditional theme.json mapping of tm scopes to colors + # have it tell you if you are missing any scopes (prefer that all scopes are covered by something) \ No newline at end of file diff --git a/syntaxes/c.tmLanguage.json b/syntaxes/c.tmLanguage.json index a64fb336..385fac10 100644 --- a/syntaxes/c.tmLanguage.json +++ b/syntaxes/c.tmLanguage.json @@ -847,8 +847,102 @@ "name": "storage.type.built-in.c" }, { - "match": "(?-mix:\\b(asm|__asm__|enum|struct|union)\\b)", + "match": "(?-mix:\\b(enum|struct|union)\\b)", "name": "storage.type.$1.c" + }, + { + "name": "meta.asm.c", + "begin": "(\\b(?:__asm__|asm)\\b)\\s*((?:volatile)?)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "storage.type.asm.c" + }, + "2": { + "name": "storage.modifier.c" + }, + "3": { + "name": "punctuation.section.parens.begin.bracket.round.assembly.c" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.assembly.c" + } + }, + "patterns": [ + { + "name": "string.quoted.double.c", + "contentName": "meta.embedded.assembly.c", + "begin": "(R?)(\")", + "beginCaptures": { + "1": { + "name": "meta.encoding.c" + }, + "2": { + "name": "punctuation.definition.string.begin.assembly.c" + } + }, + "end": "(\")", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.assembly.c" + } + }, + "patterns": [ + { + "include": "source.asm" + }, + { + "include": "source.x86" + }, + { + "include": "source.x86_64" + }, + { + "include": "source.arm" + }, + { + "include": "#backslash_escapes" + }, + { + "include": "#string_escaped_char" + }, + { + "match": "(?=not)possible" + } + ] + }, + { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.c" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.assembly.inner.c" + } + }, + "patterns": [ + { + "include": "#evaluation_context" + } + ] + }, + { + "match": ":", + "name": "punctuation.separator.delimiter.colon.assembly.c" + }, + { + "include": "#comments_context" + }, + { + "include": "#comments" + } + ] } ] }, @@ -2088,7 +2182,10 @@ }, "patterns": [ { - "include": "#conditional_context" + "include": "#evaluation_context" + }, + { + "include": "#c_conditional_context" } ] }, @@ -2108,7 +2205,10 @@ }, "patterns": [ { - "include": "#conditional_context" + "include": "#evaluation_context" + }, + { + "include": "#c_conditional_context" } ] }, @@ -2195,7 +2295,10 @@ }, "patterns": [ { - "include": "#conditional_context" + "include": "#evaluation_context" + }, + { + "include": "#c_conditional_context" } ] }, @@ -2235,11 +2338,15 @@ ] }, { - "include": "#function_call_context" + "include": "#evaluation_context" } ] }, - "conditional_context": { + "backslash_escapes": { + "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", + "name": "constant.character.escape.c" + }, + "c_conditional_context": { "patterns": [ { "include": "$base" @@ -2249,8 +2356,18 @@ } ] }, + "evalutation_context": { + "patterns": [ + { + "include": "#function-call-innards" + }, + { + "include": "$base" + } + ] + }, "member_access": { - "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())", + "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())", "captures": { "1": { "name": "variable.other.object.access.c" @@ -2292,7 +2409,7 @@ }, "method_access": { "contentName": "meta.function-call.member.c", - "begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()", + "begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()", "beginCaptures": { "1": { "name": "variable.other.object.access.c" @@ -3371,7 +3488,7 @@ "end": "(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", "patterns": [ { - "match": "(\\G0[xX])(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())" + match: "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())" captures: '1': name: variable.other.object.access.c @@ -1269,7 +1328,7 @@ name: variable.other.member.c method_access: contentName: meta.function-call.member.c - begin: "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()" + begin: "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()" beginCaptures: '1': name: variable.other.object.access.c @@ -1813,7 +1872,7 @@ begin: "(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.other.decltype.cpp storage.type.decltype.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.decltype.cpp" } }, @@ -38,12 +54,28 @@ }, "sizeof_operator": { "contentName": "meta.arguments.operator.sizeof.cpp", - "begin": "((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.sizeof.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.sizeof.cpp" } }, @@ -61,12 +93,28 @@ }, "alignof_operator": { "contentName": "meta.arguments.operator.alignof.cpp", - "begin": "((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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" } }, @@ -84,12 +132,28 @@ }, "alignas_operator": { "contentName": "meta.arguments.operator.alignas.cpp", - "begin": "((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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" } }, @@ -107,12 +171,28 @@ }, "typeid_operator": { "contentName": "meta.arguments.operator.typeid.cpp", - "begin": "((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.typeid.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.typeid.cpp" } }, @@ -154,249 +234,238 @@ "match": "\\=", "name": "keyword.operator.assignment.cpp" }, - "root_context": { + "ever_present_context": { "patterns": [ { - "include": "#struct_declare" - }, - { - "include": "#special_block_context" + "include": "#preprocessor_rule_enabled" }, { - "include": "#macro_argument" + "include": "#preprocessor_rule_disabled" }, { - "include": "#string_context" + "include": "#preprocessor_rule_conditional" }, { - "include": "#functional_specifiers_pre_parameters" + "include": "#macro_argument" }, { - "include": "#qualifiers_and_specifiers_post_parameters" + "include": "#meta_preprocessor_macro" }, { - "include": "#storage_specifiers" + "include": "#meta_preprocessor_diagnostic" }, { - "include": "#access_control_keywords" + "include": "#meta_preprocessor_include" }, { - "include": "#exception_keywords" + "include": "#pragma_mark" }, { - "include": "#static_assert" + "include": "#meta_preprocessor_line" }, { - "include": "#other_keywords" + "include": "#meta_preprocessor_undef" }, { - "include": "#memory_operators" + "include": "#meta_preprocessor_pragma" }, { - "include": "#using_name" + "include": "#hacky_fix_for_stray_directive" }, { - "include": "#the_this_keyword" + "include": "#comments_context" }, { - "include": "#language_constants" - }, + "include": "#line_continuation_character" + } + ] + }, + "root_context": { + "patterns": [ { - "include": "#template_isolated_definition" + "include": "#ever_present_context" }, { - "include": "#template_definition" + "include": "#function_definition" }, { - "include": "#misc_storage_modifiers_1" + "include": "#operator_overload" }, { "include": "#destructor" }, { - "include": "#lambdas" - }, - { - "include": "#preprocessor_context" - }, - { - "include": "#comments_context" + "include": "#using_namespace" }, { - "include": "#switch_statement" + "include": "#type_alias" }, { - "include": "#control_flow_keywords" + "include": "#using_name" }, { - "include": "#assembly" + "include": "#namespace_alias" }, { - "include": "#misc_storage_modifiers_2" + "include": "#namespace_block" }, { - "include": "#operator_overload" + "include": "#extern_block" }, { - "include": "#number_literal" + "include": "#typedef_class" }, { - "include": "#string_context_c" + "include": "#typedef_struct" }, { - "include": "#meta_preprocessor_macro" + "include": "#typedef_union" }, { - "include": "#meta_preprocessor_diagnostic" + "include": "#typedef_keyword" }, { - "include": "#meta_preprocessor_include" + "include": "#standard_declares" }, { - "include": "#pragma_mark" + "include": "#class_block" }, { - "include": "#meta_preprocessor_line" + "include": "#struct_block" }, { - "include": "#meta_preprocessor_undef" + "include": "#union_block" }, { - "include": "#meta_preprocessor_pragma" + "include": "#enum_block" }, { - "include": "#predefined_macros" + "include": "#template_isolated_definition" }, { - "include": "#operators" + "include": "#template_definition" }, { - "include": "#attributes_context" + "include": "#access_control_keywords" }, { "include": "#block" }, { - "include": "#parentheses" + "include": "#static_assert" }, { - "include": "#type_casting_operators" + "include": "#assembly" }, { - "include": "#function_definition" - }, + "include": "#evaluation_context" + } + ] + }, + "function_body_context": { + "patterns": [ { - "include": "#function_call" + "include": "#ever_present_context" }, { - "include": "#scope_resolution_inner_generated" + "include": "#using_namespace" }, { - "include": "#storage_types" + "include": "#type_alias" }, { - "include": "#line_continuation_character" + "include": "#using_name" }, { - "include": "#square_brackets" + "include": "#namespace_alias" }, { - "include": "#empty_square_brackets" + "include": "#typedef_class" }, { - "include": "#semicolon" + "include": "#typedef_struct" }, { - "include": "#comma" - } - ] - }, - "special_block_context": { - "patterns": [ + "include": "#typedef_union" + }, { - "include": "#using_namespace" + "include": "#typedef_keyword" }, { - "include": "#type_alias" + "include": "#standard_declares" }, { - "include": "#namespace_alias" + "include": "#class_block" }, { - "include": "#namespace_block" + "include": "#struct_block" }, { - "include": "#typedef_class" + "include": "#union_block" }, { - "include": "#typedef_struct" + "include": "#enum_block" }, { - "include": "#typedef_union" + "include": "#access_control_keywords" }, { - "include": "#class_block" + "include": "#block" }, { - "include": "#struct_block" + "include": "#static_assert" }, { - "include": "#union_block" + "include": "#assembly" }, { - "include": "#enum_block" + "include": "#switch_statement" }, { - "include": "#extern_block" + "include": "#evaluation_context" } ] }, - "function_body_context": { + "evaluation_context": { "patterns": [ { - "include": "#type_casting_operators" - }, - { - "include": "#function_call" - }, - { - "include": "#struct_declare" + "include": "#ever_present_context" }, { - "include": "#special_block_context" + "include": "#string_context" }, { - "include": "#macro_argument" + "include": "#number_literal" }, { - "include": "#string_context" + "include": "#string_context_c" }, { - "include": "#functional_specifiers_pre_parameters" + "include": "#method_access" }, { - "include": "#qualifiers_and_specifiers_post_parameters" + "include": "#member_access" }, { - "include": "#storage_specifiers" + "include": "#predefined_macros" }, { - "include": "#access_control_keywords" + "include": "#operators" }, { - "include": "#exception_keywords" + "include": "#memory_operators" }, { - "include": "#static_assert" + "include": "#wordlike_operators" }, { - "include": "#other_keywords" + "include": "#type_casting_operators" }, { - "include": "#memory_operators" + "include": "#control_flow_keywords" }, { - "include": "#using_name" + "include": "#exception_keywords" }, { "include": "#the_this_keyword" @@ -405,148 +474,62 @@ "include": "#language_constants" }, { - "include": "#template_isolated_definition" + "include": "#qualifiers_and_specifiers_post_parameters" }, { - "include": "#template_definition" + "include": "#functional_specifiers_pre_parameters" }, { - "include": "#misc_storage_modifiers_1" + "include": "#storage_types" }, { - "include": "#destructor" + "include": "#misc_storage_modifiers" }, { "include": "#lambdas" }, { - "include": "#preprocessor_context" + "include": "#attributes_context" }, { - "include": "#comments_context" + "include": "#c_style_type_casting" }, { - "include": "#switch_statement" + "include": "#parentheses" }, { - "include": "#control_flow_keywords" + "include": "#function_call" }, { - "include": "#assembly" + "include": "#scope_resolution_inner_generated" }, { - "include": "#misc_storage_modifiers_2" + "include": "#square_brackets" }, { - "include": "#operator_overload" + "include": "#empty_square_brackets" }, { - "include": "#number_literal" - }, - { - "include": "#string_context_c" - }, - { - "include": "#meta_preprocessor_macro" - }, - { - "include": "#meta_preprocessor_diagnostic" - }, - { - "include": "#meta_preprocessor_include" - }, - { - "include": "#pragma_mark" - }, - { - "include": "#meta_preprocessor_line" - }, - { - "include": "#meta_preprocessor_undef" - }, - { - "include": "#meta_preprocessor_pragma" - }, - { - "include": "#operators" - }, - { - "include": "#block" - }, - { - "include": "#parentheses" - }, - { - "include": "#type_casting_operators" - }, - { - "include": "#scope_resolution_inner_generated" - }, - { - "include": "#storage_types" - }, - { - "include": "#line_continuation_character" - }, - { - "include": "#square_brackets" - }, - { - "include": "#empty_square_brackets" - }, - { - "include": "#semicolon" + "include": "#semicolon" }, { "include": "#comma" } ] }, - "preprocessor_context": { - "patterns": [ - { - "include": "#preprocessor_rule_enabled" - }, - { - "include": "#preprocessor_rule_disabled" - }, - { - "include": "#preprocessor_rule_conditional" - }, - { - "include": "#hacky_fix_for_stray_directive" - } - ] - }, - "storage_types": { + "function_parameter_context": { "patterns": [ { - "include": "#storage_specifiers" - }, - { - "include": "#primitive_types" - }, - { - "include": "#non_primitive_types" - }, - { - "include": "#pthread_types" + "include": "#decltype" }, { - "include": "#posix_reserved_types" + "include": "#function_pointer_parameter" }, { - "include": "#decltype" - } - ] - }, - "function_parameter_context": { - "patterns": [ - { - "include": "#parameter_struct" + "include": "#parameter" }, { - "include": "#probably_a_parameter" + "include": "#over_qualified_types" }, { "include": "#attributes_context" @@ -554,43 +537,8 @@ { "include": "#comments_context" }, - { - "include": "#storage_types" - }, - { - "include": "#vararg_ellipses" - }, - { - "include": "#function_pointer_parameter" - }, { "include": "#comma" - }, - { - "include": "#language_constants" - }, - { - "include": "#number_literal" - }, - { - "include": "#string_context" - }, - { - "include": "#operators" - } - ] - }, - "evaluation_context": { - "patterns": [ - { - "include": "#root_context" - } - ] - }, - "conditional_context": { - "patterns": [ - { - "include": "#root_context" } ] }, @@ -657,6 +605,28 @@ } ] }, + "storage_types": { + "patterns": [ + { + "include": "#storage_specifiers" + }, + { + "include": "#primitive_types" + }, + { + "include": "#non_primitive_types" + }, + { + "include": "#pthread_types" + }, + { + "include": "#posix_reserved_types" + }, + { + "include": "#decltype" + } + ] + }, "source_wrapper": { "patterns": [ { @@ -676,7 +646,7 @@ "end": "(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", "patterns": [ { - "match": "(\\G0[xX])(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.other.decltype.cpp storage.type.decltype.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.decltype.cpp" } }, @@ -986,13 +972,13 @@ }, "storage_specifiers": { "match": "(?\\s*$)", + "match": "(?\\s*$)", "captures": { "1": { "name": "storage.type.template.cpp" @@ -1516,7 +1511,7 @@ ] }, "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*([=])", + "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" @@ -1530,7 +1525,7 @@ } }, "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*(?:(,)|(?=>|$))", + "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" @@ -1538,7 +1533,7 @@ "2": { "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})))*", + "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": "storage.type.template.argument.$0.cpp" } ] @@ -1561,7 +1556,7 @@ } }, "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*+", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", "captures": { "0": { "patterns": [ @@ -1573,7 +1568,7 @@ } }, "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*))?(::)", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": [ @@ -1599,7 +1594,7 @@ } }, "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*+", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", "captures": { "0": { "patterns": [ @@ -1611,7 +1606,7 @@ } }, "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*))?(::)", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": [ @@ -1637,7 +1632,7 @@ } }, "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*+", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", "captures": { "0": { "patterns": [ @@ -1649,7 +1644,7 @@ } }, "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*))?(::)", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": [ @@ -1675,7 +1670,7 @@ } }, "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*+", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", "captures": { "0": { "patterns": [ @@ -1687,7 +1682,7 @@ } }, "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*))?(::)", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": [ @@ -1713,7 +1708,7 @@ } }, "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*+", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", "captures": { "0": { "patterns": [ @@ -1725,7 +1720,7 @@ } }, "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*))?(::)", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": [ @@ -1751,7 +1746,7 @@ } }, "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*+", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", "captures": { "0": { "patterns": [ @@ -1763,7 +1758,7 @@ } }, "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*))?(::)", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": [ @@ -1789,7 +1784,7 @@ } }, "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*+", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", "captures": { "0": { "patterns": [ @@ -1801,7 +1796,7 @@ } }, "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*))?(::)", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": [ @@ -1827,7 +1822,7 @@ } }, "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*+", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", "captures": { "0": { "patterns": [ @@ -1839,7 +1834,7 @@ } }, "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*))?(::)", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": [ @@ -1864,8 +1859,46 @@ } } }, + "scope_resolution_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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", + "captures": { + "0": { + "patterns": [ + { + "include": "#scope_resolution_parameter_inner_generated" + } + ] + } + } + }, + "scope_resolution_parameter_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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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_parameter_inner_generated" + } + ] + }, + "2": { + "name": "entity.name.scope-resolution.parameter.cpp" + }, + "3": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "4": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.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*+", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+", "captures": { "0": { "patterns": [ @@ -1877,7 +1910,7 @@ } }, "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*))?(::)", + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": [ @@ -1903,7 +1936,7 @@ } }, "qualified_type": { - "match": "\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.])", + "match": "((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.])", "captures": { "0": { "name": "meta.qualified_type.cpp", @@ -1912,6 +1945,9 @@ "match": "(?:class|struct|union|enum)", "name": "storage.type.$0.cpp" }, + { + "include": "#attributes_context" + }, { "include": "#function_type" }, @@ -1934,12 +1970,28 @@ "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})))*", + "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": "#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": "#attributes_context" @@ -1949,17 +2001,49 @@ } ] }, - "3": { + "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": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "12": { + "name": "comment.block.cpp" + }, + "13": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "15": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] }, - "4": { + "16": { "name": "entity.name.scope-resolution.cpp" }, - "5": { + "17": { "name": "meta.template.call.cpp", "patterns": [ { @@ -1967,16 +2051,32 @@ } ] }, - "6": { + "18": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, - "7": { + "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" + }, + "23": { "name": "entity.name.type.cpp" } } }, "type_alias": { - "match": "(using)\\s*(?!namespace)(\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))|(.+(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))\\s*(\\=)\\s*((?:typename)?)\\s*((?:(?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))|(.+(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)(?:(\\[)(\\w*)(\\])\\s*)?\\s*(?:(;)|\\n)", "captures": { "1": { "name": "keyword.other.using.directive.cpp" @@ -1988,6 +2088,9 @@ "match": "(?:class|struct|union|enum)", "name": "storage.type.$0.cpp" }, + { + "include": "#attributes_context" + }, { "include": "#function_type" }, @@ -2010,12 +2113,28 @@ "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})))*", + "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" } ] }, "3": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "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": { "patterns": [ { "include": "#attributes_context" @@ -2025,17 +2144,49 @@ } ] }, - "5": { + "8": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "9": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "10": { + "name": "comment.block.cpp" + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.end.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" + }, + "17": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] }, - "6": { + "18": { "name": "entity.name.scope-resolution.cpp" }, - "7": { + "19": { "name": "meta.template.call.cpp", "patterns": [ { @@ -2043,32 +2194,51 @@ } ] }, - "8": { + "20": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, - "9": { + "21": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "22": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "23": { + "name": "comment.block.cpp" + }, + "24": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "25": { "name": "entity.name.type.cpp" }, - "10": { + "26": { "name": "keyword.operator.assignment.cpp" }, - "11": { + "27": { "name": "keyword.other.typename.cpp" }, - "12": { + "28": { "patterns": [ { "include": "#storage_specifiers" } ] }, - "13": { + "29": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "(?:class|struct|union|enum)", "name": "storage.type.$0.cpp" }, + { + "include": "#attributes_context" + }, { "include": "#function_type" }, @@ -2091,12 +2261,28 @@ "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})))*", + "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" } ] }, - "14": { + "30": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "31": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "32": { + "name": "comment.block.cpp" + }, + "33": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "34": { "patterns": [ { "include": "#attributes_context" @@ -2106,17 +2292,49 @@ } ] }, - "16": { + "35": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "36": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "37": { + "name": "comment.block.cpp" + }, + "38": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "39": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "40": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "41": { + "name": "comment.block.cpp" + }, + "42": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "44": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] }, - "17": { + "45": { "name": "entity.name.scope-resolution.cpp" }, - "18": { + "46": { "name": "meta.template.call.cpp", "patterns": [ { @@ -2124,13 +2342,29 @@ } ] }, - "19": { + "47": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, - "20": { + "48": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "49": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "50": { + "name": "comment.block.cpp" + }, + "51": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "52": { "name": "entity.name.type.cpp" }, - "21": { + "53": { "name": "meta.declaration.type.alias.value.unknown.cpp", "patterns": [ { @@ -2138,85 +2372,108 @@ } ] }, - "23": { + "55": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "56": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "57": { + "name": "comment.block.cpp" + }, + "58": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "59": { "name": "storage.modifier.pointer.cpp" }, - "24": { - "name": "storage.modifier.reference.cpp" + "60": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - "25": { - "name": "punctuation.definition.begin.bracket.square.cpp" + "61": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - "26": { + "62": { + "name": "comment.block.cpp" + }, + "63": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "64": { + "name": "storage.modifier.reference.cpp" + }, + "65": { "patterns": [ { - "include": "#evaluation_context" + "include": "#inline_comment" } ] }, - "27": { - "name": "punctuation.definition.end.bracket.square.cpp" + "66": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - "28": { - "name": "punctuation.terminator.statement.cpp" - } - }, - "name": "meta.declaration.type.alias.cpp" - }, - "struct_declare": { - "match": "(struct)\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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*+)(?])\\s*\\(\\s*(((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)\\)(?!\\s*(;))", + "captures": { "1": { - "name": "meta.head.function.definition.cpp" - }, - "2": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "(?:class|struct|union|enum)", "name": "storage.type.$0.cpp" }, + { + "include": "#attributes_context" + }, { "include": "#function_type" }, @@ -2239,2976 +2496,5591 @@ "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})))*", + "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" } ] }, - "3": { + "2": { "patterns": [ { - "include": "#attributes_context" - }, - { - "include": "#number_literal" + "include": "#inline_comment" } ] }, - "5": { - "patterns": [ - { - "include": "#scope_resolution_inner_generated" - } - ] + "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": "entity.name.scope-resolution.cpp" + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] }, "7": { - "name": "meta.template.call.cpp", "patterns": [ { - "include": "#template_call_range" + "include": "#inline_comment" } ] }, "8": { - "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { - "name": "entity.name.type.cpp" + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "11": { - "name": "storage.modifier.pointer.cpp" + "patterns": [ + { + "include": "#inline_comment" + } + ] }, "12": { - "name": "storage.modifier.reference.cpp" + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "13": { + "name": "comment.block.cpp" + }, + "14": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "16": { "patterns": [ { - "include": "#scope_resolution_function_definition_inner_generated" + "include": "#scope_resolution_inner_generated" } ] }, - "14": { - "name": "entity.name.function.definition.cpp" - } - }, - "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))", - "patterns": [ - { - "name": "meta.head.function.definition.cpp", - "begin": "\\G ?", - "end": "((?:\\{|<%|\\?\\?<|(?=;)))", - "endCaptures": { - "1": { - "name": "punctuation.section.block.begin.bracket.curly.function.definition.cpp" - } - }, + "17": { + "name": "entity.name.scope-resolution.cpp" + }, + "18": { + "name": "meta.template.call.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" + "include": "#template_call_range" } ] }, - { - "name": "meta.body.function.definition.cpp", - "begin": "(?<=\\{|<%|\\?\\?<)", - "end": "(\\}|%>|\\?\\?>)", - "endCaptures": { - "1": { - "name": "punctuation.section.block.end.bracket.curly.function.definition.cpp" - } - }, + "19": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + "20": { "patterns": [ { - "include": "#function_body_context" + "include": "#inline_comment" } ] }, - { - "name": "meta.tail.function.definition.cpp", - "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", - "end": "[\\s\\n]*(?=;)", + "21": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "22": { + "name": "comment.block.cpp" + }, + "23": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "24": { + "name": "entity.name.type.cpp" + }, + "26": { "patterns": [ { - "include": "#root_context" + "include": "#inline_comment" } ] - } - ] - }, - "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": "(?=\\))", + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "28": { + "name": "comment.block.cpp" + }, + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "30": { + "name": "storage.modifier.pointer.cpp" + }, + "31": { "patterns": [ { - "include": "#string_context" - }, - { - "include": "#string_context_c" + "include": "#inline_comment" } ] }, - { - "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": { + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "33": { + "name": "comment.block.cpp" + }, + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "35": { + "name": "storage.modifier.reference.cpp" + }, + "36": { "patterns": [ { - "include": "#scope_resolution_function_call_inner_generated" + "include": "#inline_comment" } ] }, - "2": { - "name": "entity.name.function.call.cpp" + "37": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - "3": { - "name": "meta.template.call.cpp", + "38": { + "name": "comment.block.cpp" + }, + "39": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "40": { "patterns": [ { - "include": "#template_call_range" + "include": "#inline_comment" } ] }, - "4": { - "name": "punctuation.section.arguments.begin.bracket.round.function.call.cpp" - } - }, - "end": "(\\))", - "endCaptures": { - "1": { - "name": "punctuation.section.arguments.end.bracket.round.function.call.cpp" + "41": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "42": { + "name": "comment.block.cpp" + }, + "43": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } }, - "patterns": [ - { - "include": "#function_call_context" - } - ] + "name": "meta.type.cast.cpp" }, - "operators": { + "pthread_types": { + "match": "(?>=|\\|=", - "name": "keyword.operator.assignment.compound.bitwise.cpp" + "match": "\\b__OBJC__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__OBJC__.cpp" }, { - "match": "<<|>>", - "name": "keyword.operator.bitwise.shift.cpp" + "match": "\\b__ASSEMBLER__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__ASSEMBLER__.cpp" }, { - "match": "!=|<=|>=|==|<|>", - "name": "keyword.operator.comparison.cpp" + "match": "\\b__ATOM__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__ATOM__.cpp" }, { - "match": "&&|!|\\|\\|", - "name": "keyword.operator.logical.cpp" + "match": "\\b__AVX__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__AVX__.cpp" }, { - "match": "&|\\||\\^|~", - "name": "keyword.operator.cpp" + "match": "\\b__AVX2__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__AVX2__.cpp" }, { - "include": "#assignment_operator" + "match": "\\b_CHAR_UNSIGNED\\b", + "name": "entity.name.other.preprocessor.macro.predefined._CHAR_UNSIGNED.cpp" }, { - "match": "%|\\*|/|-|\\+", - "name": "keyword.operator.cpp" + "match": "\\b__CLR_VER\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__CLR_VER.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*+(?=\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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" - } - ] + "match": "\\b_CONTROL_FLOW_GUARD\\b", + "name": "entity.name.other.preprocessor.macro.predefined._CONTROL_FLOW_GUARD.cpp" }, - "4": { - "patterns": [ - { - "include": "#scope_resolution_inner_generated" - } - ] + { + "match": "\\b__COUNTER__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__COUNTER__.cpp" }, - "5": { - "name": "entity.name.scope-resolution.cpp" + { + "match": "\\b__cplusplus_cli\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__cplusplus_cli.cpp" }, - "6": { - "name": "meta.template.call.cpp", - "patterns": [ - { - "include": "#template_call_range" - } - ] + { + "match": "\\b__cplusplus_winrt\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__cplusplus_winrt.cpp" }, - "7": { - "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + { + "match": "\\b_CPPRTTI\\b", + "name": "entity.name.other.preprocessor.macro.predefined._CPPRTTI.cpp" }, - "8": { - "name": "entity.name.type.cpp" + { + "match": "\\b_CPPUNWIND\\b", + "name": "entity.name.other.preprocessor.macro.predefined._CPPUNWIND.cpp" }, - "10": { - "name": "storage.modifier.pointer.cpp" + { + "match": "\\b_DEBUG\\b", + "name": "entity.name.other.preprocessor.macro.predefined._DEBUG.cpp" }, - "11": { - "name": "storage.modifier.reference.cpp" + { + "match": "\\b_DLL\\b", + "name": "entity.name.other.preprocessor.macro.predefined._DLL.cpp" }, - "12": { - "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" + { + "match": "\\b__FUNCDNAME__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__FUNCDNAME__.cpp" }, - "13": { - "name": "punctuation.definition.function.pointer.dereference.cpp" + { + "match": "\\b__FUNCSIG__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__FUNCSIG__.cpp" }, - "14": { - "name": "variable.other.definition.pointer.function.cpp" + { + "match": "\\b__FUNCTION__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__FUNCTION__.cpp" }, - "15": { - "name": "punctuation.definition.begin.bracket.square.cpp" + { + "match": "\\b_INTEGRAL_MAX_BITS\\b", + "name": "entity.name.other.preprocessor.macro.predefined._INTEGRAL_MAX_BITS.cpp" }, - "16": { - "patterns": [ - { - "include": "#evaluation_context" - } - ] + { + "match": "\\b__INTELLISENSE__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__INTELLISENSE__.cpp" }, - "17": { - "name": "punctuation.definition.end.bracket.square.cpp" + { + "match": "\\b_ISO_VOLATILE\\b", + "name": "entity.name.other.preprocessor.macro.predefined._ISO_VOLATILE.cpp" }, - "18": { - "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" + { + "match": "\\b_KERNEL_MODE\\b", + "name": "entity.name.other.preprocessor.macro.predefined._KERNEL_MODE.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" - } - ] - }, - "function_pointer_parameter": { - "begin": "(\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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" - } - ] + "match": "\\b_M_AMD64\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_AMD64.cpp" }, - "2": { - "patterns": [ - { - "include": "#attributes_context" - }, - { - "include": "#number_literal" - } - ] + { + "match": "\\b_M_ARM\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_ARM.cpp" }, - "4": { - "patterns": [ - { - "include": "#scope_resolution_inner_generated" - } - ] + { + "match": "\\b_M_ARM_ARMV7VE\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_ARM_ARMV7VE.cpp" }, - "5": { - "name": "entity.name.scope-resolution.cpp" + { + "match": "\\b_M_ARM_FP\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_ARM_FP.cpp" }, - "6": { - "name": "meta.template.call.cpp", - "patterns": [ - { - "include": "#template_call_range" - } - ] + { + "match": "\\b_M_ARM64\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_ARM64.cpp" }, - "7": { - "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + { + "match": "\\b_M_CEE\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_CEE.cpp" }, - "8": { - "name": "entity.name.type.cpp" + { + "match": "\\b_M_CEE_PURE\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_CEE_PURE.cpp" }, - "10": { - "name": "storage.modifier.pointer.cpp" + { + "match": "\\b_M_CEE_SAFE\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_CEE_SAFE.cpp" }, - "11": { - "name": "storage.modifier.reference.cpp" + { + "match": "\\b_M_FP_EXCEPT\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_FP_EXCEPT.cpp" }, - "12": { - "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" + { + "match": "\\b_M_FP_FAST\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_FP_FAST.cpp" }, - "13": { - "name": "punctuation.definition.function.pointer.dereference.cpp" + { + "match": "\\b_M_FP_PRECISE\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_FP_PRECISE.cpp" }, - "14": { - "name": "variable.parameter.pointer.function.cpp" + { + "match": "\\b_M_FP_STRICT\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_FP_STRICT.cpp" }, - "15": { - "name": "punctuation.definition.begin.bracket.square.cpp" + { + "match": "\\b_M_IX86\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_IX86.cpp" }, - "16": { - "patterns": [ - { - "include": "#evaluation_context" - } - ] + { + "match": "\\b_M_IX86_FP\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_IX86_FP.cpp" }, - "17": { - "name": "punctuation.definition.end.bracket.square.cpp" + { + "match": "\\b_M_X64\\b", + "name": "entity.name.other.preprocessor.macro.predefined._M_X64.cpp" }, - "18": { - "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" + { + "match": "\\b_MANAGED\\b", + "name": "entity.name.other.preprocessor.macro.predefined._MANAGED.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*(?!(?:auto|void|char|short|int|signed|unsigned|long|float|double|bool|wchar_t|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t))(?:[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" + "match": "\\b_MSC_BUILD\\b", + "name": "entity.name.other.preprocessor.macro.predefined._MSC_BUILD.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" + { + "match": "\\b_MSC_EXTENSIONS\\b", + "name": "entity.name.other.preprocessor.macro.predefined._MSC_EXTENSIONS.cpp" }, - "2": { - "name": "entity.name.operator.overloadee.cpp", - "patterns": [ - { - "include": "#scope_resolution_function_definition_operator_overload_inner_generated" - } - ] + { + "match": "\\b_MSC_FULL_VER\\b", + "name": "entity.name.other.preprocessor.macro.predefined._MSC_FULL_VER.cpp" }, - "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" + "match": "\\b_MSC_VER\\b", + "name": "entity.name.other.preprocessor.macro.predefined._MSC_VER.cpp" }, - "2": { - "name": "variable.other.object.access.cpp" + { + "match": "\\b_MSVC_LANG\\b", + "name": "entity.name.other.preprocessor.macro.predefined._MSVC_LANG.cpp" }, - "3": { - "name": "punctuation.separator.dot-access.cpp" + { + "match": "\\b__MSVC_RUNTIME_CHECKS\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__MSVC_RUNTIME_CHECKS.cpp" }, - "4": { - "name": "punctuation.separator.pointer-access.cpp" + { + "match": "\\b_MT\\b", + "name": "entity.name.other.preprocessor.macro.predefined._MT.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" - } - ] + { + "match": "\\b_NATIVE_WCHAR_T_DEFINED\\b", + "name": "entity.name.other.preprocessor.macro.predefined._NATIVE_WCHAR_T_DEFINED.cpp" }, - "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" + { + "match": "\\b_OPENMP\\b", + "name": "entity.name.other.preprocessor.macro.predefined._OPENMP.cpp" }, - "2": { - "name": "variable.other.object.access.cpp" + { + "match": "\\b_PREFAST\\b", + "name": "entity.name.other.preprocessor.macro.predefined._PREFAST.cpp" }, - "3": { - "name": "punctuation.separator.dot-access.cpp" + { + "match": "\\b__TIMESTAMP__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__TIMESTAMP__.cpp" }, - "4": { - "name": "punctuation.separator.pointer-access.cpp" + { + "match": "\\b_VC_NO_DEFAULTLIB\\b", + "name": "entity.name.other.preprocessor.macro.predefined._VC_NO_DEFAULTLIB.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" - } - ] + { + "match": "\\b_WCHAR_T_DEFINED\\b", + "name": "entity.name.other.preprocessor.macro.predefined._WCHAR_T_DEFINED.cpp" }, - "6": { - "name": "entity.name.function.member.cpp" + { + "match": "\\b_WIN32\\b", + "name": "entity.name.other.preprocessor.macro.predefined._WIN32.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" - } - ] + "match": "\\b__INCLUDE_LEVEL__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__INCLUDE_LEVEL__.cpp" }, { - "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" + "match": "\\b__ELF__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__ELF__.cpp" }, - "3": { - "name": "meta.lambda.capture.cpp", - "patterns": [ - { - "include": "#function_parameter_context" - } - ] + { + "match": "\\b__VERSION__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__VERSION__.cpp" }, - "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": "\\b__OPTIMIZE__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__OPTIMIZE__.cpp" }, { - "match": "(?)(.+?(?=\\{|$))?", - "captures": { - "1": { - "name": "punctuation.definition.lambda.return-type.cpp" - }, - "2": { - "name": "storage.type.return-type.lambda.cpp" - } - } + "match": "\\b__NO_INLINE__\\b", + "name": "entity.name.other.preprocessor.macro.predefined.__NO_INLINE__.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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\())", + "beginCaptures": { + "1": { + "name": "meta.head.function.definition.cpp" + }, + "2": { + "name": "meta.qualified_type.cpp", + "patterns": [ + { + "match": "(?:class|struct|union|enum)", + "name": "storage.type.$0.cpp" + }, + { + "include": "#attributes_context" + }, + { + "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" + } + ] + }, + "3": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "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": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "8": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "9": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "10": { + "name": "comment.block.cpp" + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.end.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" + }, + "17": { + "patterns": [ + { + "include": "#scope_resolution_inner_generated" + } + ] + }, + "18": { + "name": "entity.name.scope-resolution.cpp" + }, + "19": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "20": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + "21": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "22": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "23": { + "name": "comment.block.cpp" + }, + "24": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "25": { + "name": "entity.name.type.cpp" + }, + "27": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "28": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "29": { + "name": "comment.block.cpp" + }, + "30": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "31": { + "name": "storage.modifier.pointer.cpp" + }, + "32": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "33": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "34": { + "name": "comment.block.cpp" + }, + "35": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "36": { + "name": "storage.modifier.reference.cpp" + }, + "37": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "38": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "39": { + "name": "comment.block.cpp" + }, + "40": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "41": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "42": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "43": { + "name": "comment.block.cpp" + }, + "44": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "45": { + "patterns": [ + { + "include": "#scope_resolution_function_definition_inner_generated" + } + ] + }, + "46": { + "name": "entity.name.function.definition.cpp" + }, + "47": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "48": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "49": { + "name": "comment.block.cpp" + }, + "50": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + }, + "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))", + "patterns": [ + { + "name": "meta.head.function.definition.cpp", + "begin": "\\G ?", + "end": "((?:\\{|<%|\\?\\?<|(?=;)))", + "endCaptures": { + "1": { + "name": "punctuation.section.block.begin.bracket.curly.function.definition.cpp" + } + }, + "patterns": [ + { + "include": "#ever_present_context" + }, + { + "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": "#evaluation_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": "#evaluation_context" + } + ] + }, + "function_call": { + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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}))*)\\b(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?]*|[^>]*+<[^>]*+>)++>\\s*)?(\\()", + "beginCaptures": { + "1": { + "patterns": [ + { + "include": "#scope_resolution_function_call_inner_generated" + } + ] + }, + "2": { + "name": "entity.name.function.call.cpp" + }, + "3": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "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": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "8": { + "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": "#evaluation_context" + } + ] + }, + "operators": { + "patterns": [ + { + "include": "#sizeof_operator" + }, + { + "include": "#alignof_operator" + }, + { + "include": "#alignas_operator" + }, + { + "include": "#typeid_operator" + }, + { + "match": "--", + "name": "keyword.operator.decrement.cpp" + }, + { + "match": "\\+\\+", + "name": "keyword.operator.increment.cpp" + }, + { + "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" + }, + { + "include": "#ternary_operator" + } + ] + }, + "wordlike_operators": { + "match": "(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)(\\()(\\*)\\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": "#attributes_context" + }, + { + "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": "#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": [ + { + "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" + }, + "16": { + "patterns": [ + { + "include": "#scope_resolution_inner_generated" + } + ] + }, + "17": { + "name": "entity.name.scope-resolution.cpp" + }, + "18": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "19": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + "20": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "21": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "22": { + "name": "comment.block.cpp" + }, + "23": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "24": { + "name": "entity.name.type.cpp" + }, + "26": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "28": { + "name": "comment.block.cpp" + }, + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "30": { + "name": "storage.modifier.pointer.cpp" + }, + "31": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "33": { + "name": "comment.block.cpp" + }, + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "35": { + "name": "storage.modifier.reference.cpp" + }, + "36": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "37": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "38": { + "name": "comment.block.cpp" + }, + "39": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "40": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "41": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "42": { + "name": "comment.block.cpp" + }, + "43": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "44": { + "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" + }, + "45": { + "name": "punctuation.definition.function.pointer.dereference.cpp" + }, + "46": { + "name": "variable.other.definition.pointer.function.cpp" + }, + "47": { + "name": "punctuation.definition.begin.bracket.square.cpp" + }, + "48": { + "patterns": [ + { + "include": "#evaluation_context" + } + ] + }, + "49": { + "name": "punctuation.definition.end.bracket.square.cpp" + }, + "50": { + "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" + }, + "51": { + "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" + } + ] + }, + "function_pointer_parameter": { + "begin": "(((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)(\\()(\\*)\\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": "#attributes_context" + }, + { + "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": "#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": [ + { + "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" + }, + "16": { + "patterns": [ + { + "include": "#scope_resolution_inner_generated" + } + ] + }, + "17": { + "name": "entity.name.scope-resolution.cpp" + }, + "18": { + "name": "meta.template.call.cpp", + "patterns": [ + { + "include": "#template_call_range" + } + ] + }, + "19": { + "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" + }, + "20": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "21": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "22": { + "name": "comment.block.cpp" + }, + "23": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "24": { + "name": "entity.name.type.cpp" + }, + "26": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "28": { + "name": "comment.block.cpp" + }, + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "30": { + "name": "storage.modifier.pointer.cpp" + }, + "31": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "33": { + "name": "comment.block.cpp" + }, + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "35": { + "name": "storage.modifier.reference.cpp" + }, + "36": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "37": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "38": { + "name": "comment.block.cpp" + }, + "39": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "40": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "41": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "42": { + "name": "comment.block.cpp" + }, + "43": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "44": { + "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" + }, + "45": { + "name": "punctuation.definition.function.pointer.dereference.cpp" + }, + "46": { + "name": "variable.parameter.pointer.function.cpp" + }, + "47": { + "name": "punctuation.definition.begin.bracket.square.cpp" + }, + "48": { + "patterns": [ + { + "include": "#evaluation_context" + } + ] + }, + "49": { + "name": "punctuation.definition.end.bracket.square.cpp" + }, + "50": { + "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" + }, + "51": { + "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" + } + ] + }, + "parameter": { + "name": "meta.parameter.cpp", + "begin": "(?:(?:(?:(?:(?:(?:(?:((?]*|[^>]*+<[^>]*+>)++>\\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}))*))", + "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": "storage.modifier.specifier.$5.cpp" + }, + "6": { + "name": "entity.name.scope-resolution.parameter.cpp" + }, + "7": { + "name": "entity.name.type.parameter.cpp" + } + }, + "end": "(?:(?=\\))|(,))", + "endCaptures": { + "1": { + "name": "comma.cpp punctuation.separator.delimiter.cpp" + } + }, + "patterns": [ + { + "include": "#storage_types" + }, + { + "include": "#scope_resolution_parameter_inner_generated" + }, + { + "include": "#vararg_ellipses" + }, + { + "include": "#function_pointer_parameter" + }, + { + "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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\=))", + "beginCaptures": { + "1": { + "name": "variable.parameter.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": "variable.parameter.defaulted.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" + }, + "11": { + "name": "keyword.operator.assignment.default.cpp" + } + }, + "end": "(?:(?=\\))|(,))", + "endCaptures": { + "1": { + "name": "comma.cpp punctuation.separator.delimiter.cpp" + } + }, + "patterns": [ + { + "include": "#evaluation_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}))*", + "name": "entity.name.type.parameter.cpp" + }, + { + "include": "#template_call_range" + }, + { + "match": "(?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?", + "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": "storage.modifier.pointer.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" + }, + "10": { + "name": "storage.modifier.reference.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": { + "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" + } + } + } + ] + }, + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\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*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\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": "#evaluation_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": "#ever_present_context" + }, + { + "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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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": "#the_this_keyword" + }, + { + "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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?=\\]|\\z|$)|(,))|(\\=))", + "captures": { + "1": { + "name": "variable.parameter.capture.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": "comma.cpp punctuation.separator.delimiter.cpp" + }, + "7": { + "name": "keyword.operator.assignment.cpp" + } + } + }, + { + "include": "#evaluation_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" + } + ] + } + ] + }, + "enumerator_list": { + "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" + } + ] + } + ] + }, + "inheritance_context": { + "patterns": [ + { + "match": ",", + "name": "comma.cpp punctuation.separator.delimiter.inheritance.cpp" + }, + { + "match": "(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.])))", + "captures": { + "1": { + "name": "entity.name.type.inherited.cpp" + } + } + } + ] + }, + "class_block": { + "name": "meta.block.class.cpp", + "begin": "((((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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": "#inline_comment" + } + ] + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "7": { + "name": "comment.block.cpp" + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "9": { + "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" + }, + "10": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "12": { + "name": "comment.block.cpp" + }, + "13": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "14": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "15": { + "name": "entity.name.type.$3.cpp" + }, + "16": { + "name": "storage.type.modifier.final.cpp" + }, + "17": { + "name": "colon.cpp punctuation.separator.inheritance.cpp" + }, + "18": { + "patterns": [ + { + "include": "#inheritance_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": "#ever_present_context" + }, + { + "include": "#inheritance_context" + }, + { + "include": "#template_call_range" + } + ] + }, + { + "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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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": "#inline_comment" + } + ] + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "7": { + "name": "comment.block.cpp" + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "9": { + "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" + }, + "10": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "12": { + "name": "comment.block.cpp" + }, + "13": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "14": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "15": { + "name": "entity.name.type.$3.cpp" + }, + "16": { + "name": "storage.type.modifier.final.cpp" + }, + "17": { + "name": "colon.cpp punctuation.separator.inheritance.cpp" + }, + "18": { + "patterns": [ + { + "include": "#inheritance_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": "#ever_present_context" + }, + { + "include": "#inheritance_context" + }, + { + "include": "#template_call_range" + } + ] + }, + { + "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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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": "#inline_comment" + } + ] + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "7": { + "name": "comment.block.cpp" + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "9": { + "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" + }, + "10": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "12": { + "name": "comment.block.cpp" + }, + "13": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "14": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "15": { + "name": "entity.name.type.$3.cpp" + }, + "16": { + "name": "storage.type.modifier.final.cpp" + }, + "17": { + "name": "colon.cpp punctuation.separator.inheritance.cpp" + }, + "18": { + "patterns": [ + { + "include": "#inheritance_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": "#ever_present_context" + }, + { + "include": "#inheritance_context" + }, + { + "include": "#template_call_range" + } + ] + }, + { + "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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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": "#inline_comment" + } + ] + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "7": { + "name": "comment.block.cpp" + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "9": { + "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" + }, + "10": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "12": { + "name": "comment.block.cpp" + }, + "13": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "14": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "15": { + "name": "entity.name.type.$3.cpp" + }, + "16": { + "name": "storage.type.modifier.final.cpp" + }, + "17": { + "name": "colon.cpp punctuation.separator.inheritance.cpp" + }, + "18": { + "patterns": [ + { + "include": "#inheritance_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": "#ever_present_context" + }, + { + "include": "#inheritance_context" + }, + { + "include": "#template_call_range" + } + ] + }, + { + "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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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": "#inline_comment" + } + ] + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "7": { + "name": "comment.block.cpp" + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "9": { + "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" + }, + "10": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "12": { + "name": "comment.block.cpp" + }, + "13": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "14": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "15": { + "name": "entity.name.type.$3.cpp" + }, + "16": { + "name": "storage.type.modifier.final.cpp" + }, + "17": { + "name": "colon.cpp punctuation.separator.inheritance.cpp" + }, + "18": { + "patterns": [ + { + "include": "#inheritance_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": "#ever_present_context" + }, + { + "include": "#inheritance_context" + }, + { + "include": "#template_call_range" + } + ] + }, + { + "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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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": "#inline_comment" + } + ] + }, + "6": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "7": { + "name": "comment.block.cpp" + }, + "8": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "9": { + "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" + }, + "10": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "11": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "12": { + "name": "comment.block.cpp" + }, + "13": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "14": { + "patterns": [ + { + "include": "#attributes_context" + }, + { + "include": "#number_literal" + } + ] + }, + "15": { + "name": "entity.name.type.$3.cpp" + }, + "16": { + "name": "storage.type.modifier.final.cpp" + }, + "17": { + "name": "colon.cpp punctuation.separator.inheritance.cpp" + }, + "18": { + "patterns": [ + { + "include": "#inheritance_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": "#ever_present_context" + }, + { + "include": "#inheritance_context" + }, + { + "include": "#template_call_range" + } + ] + }, + { + "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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!final\\W|final\\$|override\\W|override\\$)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?!:)", + "captures": { + "1": { + "name": "storage.type.struct.declare.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": "entity.name.type.struct.cpp" + }, + "8": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "9": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "10": { + "name": "comment.block.cpp" }, - { - "match": "\\b__INT8_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT8_MAX__.cpp" + "11": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__INT16_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT16_MAX__.cpp" + "12": { + "name": "storage.modifier.pointer.cpp" }, - { - "match": "\\b__INT32_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT32_MAX__.cpp" + "13": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__INT64_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT64_MAX__.cpp" + "14": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__UINT8_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT8_MAX__.cpp" + "15": { + "name": "comment.block.cpp" }, - { - "match": "\\b__UINT16_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT16_MAX__.cpp" + "16": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__UINT32_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT32_MAX__.cpp" + "17": { + "name": "storage.modifier.reference.cpp" }, - { - "match": "\\b__UINT64_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT64_MAX__.cpp" + "18": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__INT_LEAST8_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_LEAST8_MAX__.cpp" + "19": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__INT_LEAST16_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_LEAST16_MAX__.cpp" + "20": { + "name": "comment.block.cpp" }, - { - "match": "\\b__INT_LEAST32_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_LEAST32_MAX__.cpp" + "21": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__INT_LEAST64_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_LEAST64_MAX__.cpp" + "22": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__UINT_LEAST8_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT_LEAST8_MAX__.cpp" + "23": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__UINT_LEAST16_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT_LEAST16_MAX__.cpp" + "24": { + "name": "comment.block.cpp" }, - { - "match": "\\b__UINT_LEAST32_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT_LEAST32_MAX__.cpp" + "25": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__UINT_LEAST64_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT_LEAST64_MAX__.cpp" + "26": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__INT_FAST8_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_FAST8_MAX__.cpp" + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__INT_FAST16_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_FAST16_MAX__.cpp" + "28": { + "name": "comment.block.cpp" }, - { - "match": "\\b__INT_FAST32_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_FAST32_MAX__.cpp" + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__INT_FAST64_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_FAST64_MAX__.cpp" + "30": { + "name": "variable.other.object.declare.cpp" }, - { - "match": "\\b__UINT_FAST8_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT_FAST8_MAX__.cpp" + "31": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__UINT_FAST16_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT_FAST16_MAX__.cpp" + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__UINT_FAST32_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT_FAST32_MAX__.cpp" + "33": { + "name": "comment.block.cpp" }, - { - "match": "\\b__UINT_FAST64_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINT_FAST64_MAX__.cpp" + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + }, + "union_declare": { + "match": "(union)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!final\\W|final\\$|override\\W|override\\$)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?!:)", + "captures": { + "1": { + "name": "storage.type.union.declare.cpp" }, - { - "match": "\\b__INTPTR_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INTPTR_MAX__.cpp" + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__UINTPTR_MAX__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__UINTPTR_MAX__.cpp" + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__WCHAR_MIN__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__WCHAR_MIN__.cpp" + "4": { + "name": "comment.block.cpp" }, - { - "match": "\\b__WINT_MIN__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__WINT_MIN__.cpp" + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__SIG_ATOMIC_MIN__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIG_ATOMIC_MIN__.cpp" + "6": { + "name": "entity.name.type.union.cpp" }, - { - "match": "\\b__SCHAR_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SCHAR_WIDTH__.cpp" + "8": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__SHRT_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SHRT_WIDTH__.cpp" + "9": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__INT_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_WIDTH__.cpp" + "10": { + "name": "comment.block.cpp" }, - { - "match": "\\b__LONG_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__LONG_WIDTH__.cpp" + "11": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__LONG_LONG_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__LONG_LONG_WIDTH__.cpp" + "12": { + "name": "storage.modifier.pointer.cpp" }, - { - "match": "\\b__PTRDIFF_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__PTRDIFF_WIDTH__.cpp" + "13": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__SIG_ATOMIC_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIG_ATOMIC_WIDTH__.cpp" + "14": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__SIZE_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZE_WIDTH__.cpp" + "15": { + "name": "comment.block.cpp" }, - { - "match": "\\b__WCHAR_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__WCHAR_WIDTH__.cpp" + "16": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__WINT_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__WINT_WIDTH__.cpp" + "17": { + "name": "storage.modifier.reference.cpp" }, - { - "match": "\\b__INT_LEAST8_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_LEAST8_WIDTH__.cpp" + "18": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__INT_LEAST16_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_LEAST16_WIDTH__.cpp" + "19": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__INT_LEAST32_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_LEAST32_WIDTH__.cpp" + "20": { + "name": "comment.block.cpp" }, - { - "match": "\\b__INT_LEAST64_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_LEAST64_WIDTH__.cpp" + "21": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__INT_FAST8_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_FAST8_WIDTH__.cpp" + "22": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__INT_FAST16_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_FAST16_WIDTH__.cpp" + "23": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__INT_FAST32_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_FAST32_WIDTH__.cpp" + "24": { + "name": "comment.block.cpp" }, - { - "match": "\\b__INT_FAST64_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INT_FAST64_WIDTH__.cpp" + "25": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__INTPTR_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INTPTR_WIDTH__.cpp" + "26": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__INTMAX_WIDTH__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__INTMAX_WIDTH__.cpp" + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__SIZEOF_INT__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_INT__.cpp" + "28": { + "name": "comment.block.cpp" }, - { - "match": "\\b__SIZEOF_LONG__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_LONG__.cpp" + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__SIZEOF_LONG_LONG__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_LONG_LONG__.cpp" + "30": { + "name": "variable.other.object.declare.cpp" }, - { - "match": "\\b__SIZEOF_SHORT__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_SHORT__.cpp" + "31": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__SIZEOF_POINTER__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_POINTER__.cpp" + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__SIZEOF_FLOAT__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_FLOAT__.cpp" + "33": { + "name": "comment.block.cpp" }, - { - "match": "\\b__SIZEOF_DOUBLE__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_DOUBLE__.cpp" + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + }, + "enum_declare": { + "match": "(enum)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!final\\W|final\\$|override\\W|override\\$)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?!:)", + "captures": { + "1": { + "name": "storage.type.enum.declare.cpp" }, - { - "match": "\\b__SIZEOF_LONG_DOUBLE__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_LONG_DOUBLE__.cpp" + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__SIZEOF_SIZE_T__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_SIZE_T__.cpp" + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__SIZEOF_WCHAR_T__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_WCHAR_T__.cpp" + "4": { + "name": "comment.block.cpp" }, - { - "match": "\\b__SIZEOF_WINT_T__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_WINT_T__.cpp" + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__SIZEOF_PTRDIFF_T__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SIZEOF_PTRDIFF_T__.cpp" + "6": { + "name": "entity.name.type.enum.cpp" }, - { - "match": "\\b__BYTE_ORDER__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__BYTE_ORDER__.cpp" + "8": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__ORDER_LITTLE_ENDIAN__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__ORDER_LITTLE_ENDIAN__.cpp" + "9": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__ORDER_BIG_ENDIAN__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__ORDER_BIG_ENDIAN__.cpp" + "10": { + "name": "comment.block.cpp" }, - { - "match": "\\b__ORDER_PDP_ENDIAN__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__ORDER_PDP_ENDIAN__.cpp" + "11": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__FLOAT_WORD_ORDER__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FLOAT_WORD_ORDER__.cpp" + "12": { + "name": "storage.modifier.pointer.cpp" }, - { - "match": "\\b__DEPRECATED\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__DEPRECATED.cpp" + "13": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__EXCEPTIONS\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__EXCEPTIONS.cpp" + "14": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__GXX_RTTI\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GXX_RTTI.cpp" + "15": { + "name": "comment.block.cpp" }, - { - "match": "\\b__USING_SJLJ_EXCEPTIONS__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__USING_SJLJ_EXCEPTIONS__.cpp" + "16": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__GXX_EXPERIMENTAL_CXX0X__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GXX_EXPERIMENTAL_CXX0X__.cpp" + "17": { + "name": "storage.modifier.reference.cpp" }, - { - "match": "\\b__GXX_WEAK__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GXX_WEAK__.cpp" + "18": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__NEXT_RUNTIME__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__NEXT_RUNTIME__.cpp" + "19": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__LP64__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__LP64__.cpp" + "20": { + "name": "comment.block.cpp" }, - { - "match": "\\b_LP64\\b", - "name": "entity.name.other.preprocessor.macro.predefined._LP64.cpp" + "21": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__SSP__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SSP__.cpp" + "22": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__SSP_ALL__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SSP_ALL__.cpp" + "23": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__SSP_STRONG__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SSP_STRONG__.cpp" + "24": { + "name": "comment.block.cpp" }, - { - "match": "\\b__SSP_EXPLICIT__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SSP_EXPLICIT__.cpp" + "25": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__SANITIZE_ADDRESS__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SANITIZE_ADDRESS__.cpp" + "26": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__SANITIZE_THREAD__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__SANITIZE_THREAD__.cpp" + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1.cpp" + "28": { + "name": "comment.block.cpp" }, - { - "match": "\\b__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2.cpp" + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4.cpp" + "30": { + "name": "variable.other.object.declare.cpp" }, - { - "match": "\\b__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8.cpp" + "31": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16.cpp" + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__HAVE_SPECULATION_SAFE_VALUE\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__HAVE_SPECULATION_SAFE_VALUE.cpp" + "33": { + "name": "comment.block.cpp" }, - { - "match": "\\b__GCC_HAVE_DWARF2_CFI_ASM\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GCC_HAVE_DWARF2_CFI_ASM.cpp" + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + }, + "class_declare": { + "match": "(class)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!final\\W|final\\$|override\\W|override\\$)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?!:)", + "captures": { + "1": { + "name": "storage.type.class.declare.cpp" }, - { - "match": "\\b__FP_FAST_FMA\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMA.cpp" + "2": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__FP_FAST_FMAF\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMAF.cpp" + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__FP_FAST_FMAL\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMAL.cpp" + "4": { + "name": "comment.block.cpp" + }, + "5": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__FP_FAST_FMAF16\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMAF16.cpp" + "6": { + "name": "entity.name.type.class.cpp" }, - { - "match": "\\b__FP_FAST_FMAF32\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMAF32.cpp" + "8": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__FP_FAST_FMAF64\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMAF64.cpp" + "9": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__FP_FAST_FMAF128\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMAF128.cpp" + "10": { + "name": "comment.block.cpp" }, - { - "match": "\\b__FP_FAST_FMAF32X\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMAF32X.cpp" + "11": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__FP_FAST_FMAF64X\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMAF64X.cpp" + "12": { + "name": "storage.modifier.pointer.cpp" }, - { - "match": "\\b__FP_FAST_FMAF128X\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FP_FAST_FMAF128X.cpp" + "13": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__GCC_IEC_559\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GCC_IEC_559.cpp" + "14": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__GCC_IEC_559_COMPLEX\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__GCC_IEC_559_COMPLEX.cpp" + "15": { + "name": "comment.block.cpp" }, - { - "match": "\\b__NO_MATH_ERRNO__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__NO_MATH_ERRNO__.cpp" + "16": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__has_builtin\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_builtin.cpp" + "17": { + "name": "storage.modifier.reference.cpp" }, - { - "match": "\\b__has_feature\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_feature.cpp" + "18": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__has_extension\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_extension.cpp" + "19": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__has_cpp_attribute\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_cpp_attribute.cpp" + "20": { + "name": "comment.block.cpp" }, - { - "match": "\\b__has_c_attribute\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_c_attribute.cpp" + "21": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__has_attribute\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_attribute.cpp" + "22": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__has_declspec_attribute\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_declspec_attribute.cpp" + "23": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__is_identifier\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__is_identifier.cpp" + "24": { + "name": "comment.block.cpp" }, - { - "match": "\\b__has_include\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_include.cpp" + "25": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__has_include_next\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_include_next.cpp" + "26": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__has_warning\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__has_warning.cpp" + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__BASE_FILE__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__BASE_FILE__.cpp" + "28": { + "name": "comment.block.cpp" }, - { - "match": "\\b__FILE_NAME__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__FILE_NAME__.cpp" + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - { - "match": "\\b__clang__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__clang__.cpp" + "30": { + "name": "variable.other.object.declare.cpp" }, - { - "match": "\\b__clang_major__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__clang_major__.cpp" + "31": { + "patterns": [ + { + "include": "#inline_comment" + } + ] }, - { - "match": "\\b__clang_minor__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__clang_minor__.cpp" + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - { - "match": "\\b__clang_patchlevel__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__clang_patchlevel__.cpp" + "33": { + "name": "comment.block.cpp" }, + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + } + } + }, + "standard_declares": { + "patterns": [ { - "match": "\\b__clang_version__\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__clang_version__.cpp" + "include": "#struct_declare" }, { - "match": "\\b__fp16\\b", - "name": "entity.name.other.preprocessor.macro.predefined.__fp16.cpp" + "include": "#union_declare" }, { - "match": "\\b_Float16\\b", - "name": "entity.name.other.preprocessor.macro.predefined._Float16.cpp" + "include": "#enum_declare" }, { - "match": "(\\b__([A-Z_])__\\b)", - "captures": { - "1": { - "name": "entity.name.other.preprocessor.macro.predefined.probably.$2.cpp" - } - } + "include": "#class_declare" } ] }, - "enumerator_list": { - "match": "((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\[((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { - "name": "variable.other.enummember.cpp" + "name": "storage.type.struct.parameter.cpp" }, "2": { "patterns": [ { - "include": "#attributes_context" - }, - { - "include": "#number_literal" + "include": "#inline_comment" } ] }, "3": { - "name": "keyword.operator.assignment.cpp" + "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": "entity.name.type.struct.parameter.cpp" + }, + "7": { "patterns": [ { - "include": "#evaluation_context" + "include": "#inline_comment" } ] }, - "5": { + "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" + }, + "12": { "patterns": [ { - "include": "#comma" - }, + "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": { + "name": "storage.modifier.pointer.cpp" + }, + "17": { + "patterns": [ { - "include": "#semicolon" + "include": "#inline_comment" + } + ] + }, + "18": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "19": { + "name": "comment.block.cpp" + }, + "20": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "21": { + "name": "storage.modifier.reference.cpp" + }, + "22": { + "patterns": [ + { + "include": "#inline_comment" + } + ] + }, + "23": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "24": { + "name": "comment.block.cpp" + }, + "25": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "26": { + "patterns": [ + { + "include": "#inline_comment" } ] - } - }, - "name": "meta.enum.definition.cpp" - }, - "enum_block": { - "name": "meta.block.enum.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*((?|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", - "endCaptures": { + } + }, + "parameter_enum": { + "match": "(enum)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\[((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?(?=,|\\)|\\n)", + "captures": { "1": { - "name": "punctuation.terminator.statement.cpp" + "name": "storage.type.enum.parameter.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" + "include": "#inline_comment" } ] }, - { - "name": "meta.body.enum.cpp", - "begin": "(?<=\\{|<%|\\?\\?<)", - "end": "(\\}|%>|\\?\\?>)", - "endCaptures": { - "1": { - "name": "punctuation.section.block.end.bracket.curly.enum.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": { + "name": "entity.name.type.enum.parameter.cpp" + }, + "7": { "patterns": [ { - "include": "#enumerator_list" - }, - { - "include": "#comments_context" - }, - { - "include": "#comma" - }, - { - "include": "#semicolon" + "include": "#inline_comment" } ] }, - { - "name": "meta.tail.enum.cpp", - "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", - "end": "[\\s\\n]*(?=;)", + "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" + }, + "12": { "patterns": [ { - "include": "#root_context" + "include": "#inline_comment" } ] - } - ] - }, - "inheritance_context": { - "patterns": [ - { - "match": ",", - "name": "comma.cpp punctuation.separator.delimiter.inheritance.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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", - "beginCaptures": { - "1": { - "name": "meta.head.class.cpp" + "15": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - "3": { - "name": "storage.type.$3.cpp" + "16": { + "name": "storage.modifier.pointer.cpp" }, - "4": { + "17": { "patterns": [ { - "include": "#attributes_context" - }, - { - "include": "#number_literal" + "include": "#inline_comment" } ] }, - "5": { + "18": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "19": { + "name": "comment.block.cpp" + }, + "20": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "21": { + "name": "storage.modifier.reference.cpp" + }, + "22": { "patterns": [ { - "include": "#attributes_context" - }, - { - "include": "#number_literal" + "include": "#inline_comment" } ] }, - "6": { - "name": "entity.name.type.$3.cpp" + "23": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - "7": { - "name": "storage.type.modifier.final.cpp" + "24": { + "name": "comment.block.cpp" }, - "8": { - "name": "colon.cpp punctuation.separator.inheritance.cpp" + "25": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - "9": { + "26": { "patterns": [ { - "include": "#inheritance_context" + "include": "#inline_comment" } ] - } - }, - "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" - } - }, + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "28": { + "name": "comment.block.cpp" + }, + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "30": { + "name": "variable.other.object.declare.cpp" + }, + "31": { "patterns": [ { - "include": "#preprocessor_context" - }, - { - "include": "#inheritance_context" - }, - { - "include": "#template_call_range" - }, - { - "include": "#comments_context" + "include": "#inline_comment" } ] }, - { - "name": "meta.body.class.cpp", - "begin": "(?<=\\{|<%|\\?\\?<)", - "end": "(\\}|%>|\\?\\?>)", - "endCaptures": { - "1": { - "name": "punctuation.section.block.end.bracket.curly.class.cpp" - } - }, + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "33": { + "name": "comment.block.cpp" + }, + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "35": { "patterns": [ { - "include": "#function_pointer" - }, - { - "include": "#constructor_context" - }, - { - "include": "#root_context" + "include": "#inline_comment" } ] }, - { - "name": "meta.tail.class.cpp", - "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", - "end": "[\\s\\n]*(?=;)", + "36": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "37": { + "name": "comment.block.cpp" + }, + "38": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "39": { "patterns": [ { - "include": "#root_context" + "include": "#inline_comment" } ] + }, + "40": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "41": { + "name": "comment.block.cpp" + }, + "42": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } - ] + } }, - "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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", - "beginCaptures": { + "parameter_union": { + "match": "(union)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\[((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?(?=,|\\)|\\n)", + "captures": { "1": { - "name": "meta.head.struct.cpp" - }, - "3": { - "name": "storage.type.$3.cpp" + "name": "storage.type.union.parameter.cpp" }, - "4": { + "2": { "patterns": [ { - "include": "#attributes_context" - }, - { - "include": "#number_literal" + "include": "#inline_comment" } ] }, + "3": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "4": { + "name": "comment.block.cpp" + }, "5": { - "patterns": [ - { - "include": "#attributes_context" - }, - { - "include": "#number_literal" - } - ] + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, "6": { - "name": "entity.name.type.$3.cpp" + "name": "entity.name.type.union.parameter.cpp" }, "7": { - "name": "storage.type.modifier.final.cpp" + "patterns": [ + { + "include": "#inline_comment" + } + ] }, "8": { - "name": "colon.cpp punctuation.separator.inheritance.cpp" + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { + "name": "comment.block.cpp" + }, + "10": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "12": { "patterns": [ { - "include": "#inheritance_context" + "include": "#inline_comment" } ] - } - }, - "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" - } - }, + "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": { + "name": "storage.modifier.pointer.cpp" + }, + "17": { "patterns": [ { - "include": "#preprocessor_context" - }, - { - "include": "#inheritance_context" - }, - { - "include": "#template_call_range" - }, - { - "include": "#comments_context" + "include": "#inline_comment" } ] }, - { - "name": "meta.body.struct.cpp", - "begin": "(?<=\\{|<%|\\?\\?<)", - "end": "(\\}|%>|\\?\\?>)", - "endCaptures": { - "1": { - "name": "punctuation.section.block.end.bracket.curly.struct.cpp" - } - }, + "18": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "19": { + "name": "comment.block.cpp" + }, + "20": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "21": { + "name": "storage.modifier.reference.cpp" + }, + "22": { "patterns": [ { - "include": "#function_pointer" - }, - { - "include": "#constructor_context" - }, - { - "include": "#root_context" + "include": "#inline_comment" } ] }, - { - "name": "meta.tail.struct.cpp", - "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", - "end": "[\\s\\n]*(?=;)", + "23": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "24": { + "name": "comment.block.cpp" + }, + "25": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "26": { "patterns": [ { - "include": "#root_context" + "include": "#inline_comment" } ] - } - ] - }, - "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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", - "beginCaptures": { - "1": { - "name": "meta.head.union.cpp" }, - "3": { - "name": "storage.type.$3.cpp" + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - "4": { + "28": { + "name": "comment.block.cpp" + }, + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "30": { + "name": "variable.other.object.declare.cpp" + }, + "31": { "patterns": [ { - "include": "#attributes_context" - }, - { - "include": "#number_literal" + "include": "#inline_comment" } ] }, - "5": { + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "33": { + "name": "comment.block.cpp" + }, + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "35": { "patterns": [ { - "include": "#attributes_context" - }, - { - "include": "#number_literal" + "include": "#inline_comment" } ] }, - "6": { - "name": "entity.name.type.$3.cpp" + "36": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, - "7": { - "name": "storage.type.modifier.final.cpp" + "37": { + "name": "comment.block.cpp" }, - "8": { - "name": "colon.cpp punctuation.separator.inheritance.cpp" + "38": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, - "9": { + "39": { "patterns": [ { - "include": "#inheritance_context" + "include": "#inline_comment" } ] + }, + "40": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "41": { + "name": "comment.block.cpp" + }, + "42": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" } - }, - "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", - "endCaptures": { + } + }, + "parameter_class": { + "match": "(class)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\[((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?(?=,|\\)|\\n)", + "captures": { "1": { - "name": "punctuation.terminator.statement.cpp" + "name": "storage.type.class.parameter.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": "#inheritance_context" - }, - { - "include": "#template_call_range" - }, - { - "include": "#comments_context" + "include": "#inline_comment" } ] }, - { - "name": "meta.body.union.cpp", - "begin": "(?<=\\{|<%|\\?\\?<)", - "end": "(\\}|%>|\\?\\?>)", - "endCaptures": { - "1": { - "name": "punctuation.section.block.end.bracket.curly.union.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": { + "name": "entity.name.type.class.parameter.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" + }, + "12": { "patterns": [ { - "include": "#function_pointer" - }, - { - "include": "#constructor_context" - }, - { - "include": "#root_context" + "include": "#inline_comment" } ] }, - { - "name": "meta.tail.union.cpp", - "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", - "end": "[\\s\\n]*(?=;)", + "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": { + "name": "storage.modifier.pointer.cpp" + }, + "17": { "patterns": [ { - "include": "#root_context" + "include": "#inline_comment" } ] - } - ] - }, - "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" + "18": { + "name": "comment.block.cpp punctuation.definition.comment.begin.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" - } - }, + "19": { + "name": "comment.block.cpp" + }, + "20": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "21": { + "name": "storage.modifier.reference.cpp" + }, + "22": { "patterns": [ { - "include": "#root_context" + "include": "#inline_comment" } ] }, - { - "name": "meta.body.extern.cpp", - "begin": "(?<=\\{|<%|\\?\\?<)", - "end": "(\\}|%>|\\?\\?>)", - "endCaptures": { - "1": { - "name": "punctuation.section.block.end.bracket.curly.extern.cpp" - } - }, + "23": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "24": { + "name": "comment.block.cpp" + }, + "25": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "26": { "patterns": [ { - "include": "#root_context" + "include": "#inline_comment" } ] }, - { - "name": "meta.tail.extern.cpp", - "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", - "end": "[\\s\\n]*(?=;)", + "27": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "28": { + "name": "comment.block.cpp" + }, + "29": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "30": { + "name": "variable.other.object.declare.cpp" + }, + "31": { "patterns": [ { - "include": "#root_context" + "include": "#inline_comment" } ] }, - { - "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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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.inheritance.cpp" - }, - "9": { - "patterns": [ - { - "include": "#inheritance_context" - } - ] - } - }, - "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", - "endCaptures": { - "1": { - "name": "punctuation.terminator.statement.cpp" - }, - "2": { - "name": "punctuation.terminator.statement.cpp" - } - }, + "32": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "33": { + "name": "comment.block.cpp" + }, + "34": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "35": { "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": "#inheritance_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" - } - ] - }, + "include": "#inline_comment" + } + ] + }, + "36": { + "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" + }, + "37": { + "name": "comment.block.cpp" + }, + "38": { + "name": "comment.block.cpp punctuation.definition.comment.end.cpp" + }, + "39": { + "patterns": [ { - "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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))", + "name": "string.quoted.double.cpp", + "contentName": "meta.embedded.assembly.cpp", + "begin": "(R?)(\")", "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.inheritance.cpp" + "name": "meta.encoding.cpp" }, - "9": { - "patterns": [ - { - "include": "#inheritance_context" - } - ] + "2": { + "name": "punctuation.definition.string.begin.assembly.cpp" } }, - "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", + "end": "(\")", "endCaptures": { "1": { - "name": "punctuation.terminator.statement.cpp" - }, - "2": { - "name": "punctuation.terminator.statement.cpp" + "name": "punctuation.definition.string.end.assembly.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": "#inheritance_context" - }, - { - "include": "#template_call_range" - }, - { - "include": "#comments_context" - } - ] + "include": "source.asm" }, { - "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" - } - ] + "include": "source.x86" }, { - "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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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" - } - ] + "include": "source.x86_64" }, - "6": { - "name": "entity.name.type.$3.cpp" + { + "include": "source.arm" }, - "7": { - "name": "storage.type.modifier.final.cpp" + { + "include": "#backslash_escapes" }, - "8": { - "name": "colon.cpp punctuation.separator.inheritance.cpp" + { + "include": "#string_escaped_char" }, - "9": { - "patterns": [ - { - "include": "#inheritance_context" - } - ] + { + "match": "(?=not)possible" } - }, - "end": "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))", - "endCaptures": { + ] + }, + { + "begin": "(\\()", + "beginCaptures": { "1": { - "name": "punctuation.terminator.statement.cpp" - }, - "2": { - "name": "punctuation.terminator.statement.cpp" + "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.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": "#inheritance_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" - } - ] - }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.section.parens.end.bracket.round.assembly.inner.cpp" + } + }, + "patterns": [ { - "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*(\\))", + "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*::\\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" @@ -5533,7 +8397,7 @@ "patterns": [ { "name": "string.quoted.double.cpp", - "begin": "((u|u8|U|L)?\")", + "begin": "(((?:u|u8|U|L)?)\")", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.cpp" @@ -5558,11 +8422,11 @@ "name": "constant.character.escape.cpp" }, { - "match": "\\\\(?:[0-7]){1,3}", + "match": "\\\\[0-7]{1,3}", "name": "constant.character.escape.cpp" }, { - "match": "\\\\x(?:[0-9a-fA-F]){2,2}", + "match": "\\\\x[0-9a-fA-F]{2,2}", "name": "constant.character.escape.cpp" }, { @@ -5572,7 +8436,7 @@ }, { "name": "string.quoted.single.cpp", - "begin": "((?=+!]+ | \\(\\) | \\[\\]))\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" + "include": "#function_body_context" } ] }, @@ -5814,31 +8605,14 @@ }, "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" + "include": "#over_qualified_types" }, { "match": "(?-mix:(?=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", + "begin": "(?x)\n(?=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", "end": "(?<=\\))(?!\\w)|(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()" beginCaptures: '1': name: keyword.operator.functionlike.cpp keyword.other.decltype.cpp storage.type.decltype.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.decltype.cpp end: "(\\))" endCaptures: @@ -25,11 +34,20 @@ - include: "#evaluation_context" sizeof_operator: contentName: meta.arguments.operator.sizeof.cpp - begin: "((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()" beginCaptures: '1': name: keyword.operator.functionlike.cpp keyword.operator.sizeof.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.sizeof.cpp end: "(\\))" endCaptures: @@ -39,11 +57,20 @@ - include: "#evaluation_context" alignof_operator: contentName: meta.arguments.operator.alignof.cpp - begin: "((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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 end: "(\\))" endCaptures: @@ -53,11 +80,20 @@ - include: "#evaluation_context" alignas_operator: contentName: meta.arguments.operator.alignas.cpp - begin: "((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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 end: "(\\))" endCaptures: @@ -67,11 +103,20 @@ - include: "#evaluation_context" typeid_operator: contentName: meta.arguments.operator.typeid.cpp - begin: "((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()" beginCaptures: '1': name: keyword.operator.functionlike.cpp keyword.operator.typeid.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.typeid.cpp end: "(\\))" endCaptures: @@ -97,37 +142,12 @@ assignment_operator: match: "\\=" name: keyword.operator.assignment.cpp - root_context: + ever_present_context: patterns: - - include: "#struct_declare" - - include: "#special_block_context" + - include: "#preprocessor_rule_enabled" + - include: "#preprocessor_rule_disabled" + - include: "#preprocessor_rule_conditional" - include: "#macro_argument" - - include: "#string_context" - - include: "#functional_specifiers_pre_parameters" - - include: "#qualifiers_and_specifiers_post_parameters" - - include: "#storage_specifiers" - - include: "#access_control_keywords" - - include: "#exception_keywords" - - include: "#static_assert" - - include: "#other_keywords" - - include: "#memory_operators" - - include: "#using_name" - - include: "#the_this_keyword" - - include: "#language_constants" - - include: "#template_isolated_definition" - - include: "#template_definition" - - include: "#misc_storage_modifiers_1" - - include: "#destructor" - - include: "#lambdas" - - include: "#preprocessor_context" - - include: "#comments_context" - - include: "#switch_statement" - - include: "#control_flow_keywords" - - include: "#assembly" - - include: "#misc_storage_modifiers_2" - - include: "#operator_overload" - - include: "#number_literal" - - include: "#string_context_c" - include: "#meta_preprocessor_macro" - include: "#meta_preprocessor_diagnostic" - include: "#meta_preprocessor_include" @@ -135,120 +155,99 @@ - include: "#meta_preprocessor_line" - include: "#meta_preprocessor_undef" - include: "#meta_preprocessor_pragma" - - include: "#predefined_macros" - - include: "#operators" - - include: "#attributes_context" - - include: "#block" - - include: "#parentheses" - - include: "#type_casting_operators" - - include: "#function_definition" - - include: "#function_call" - - include: "#scope_resolution_inner_generated" - - include: "#storage_types" + - include: "#hacky_fix_for_stray_directive" + - include: "#comments_context" - include: "#line_continuation_character" - - include: "#square_brackets" - - include: "#empty_square_brackets" - - include: "#semicolon" - - include: "#comma" - special_block_context: + root_context: patterns: + - include: "#ever_present_context" + - include: "#function_definition" + - include: "#operator_overload" + - include: "#destructor" - 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: "#typedef_keyword" + - include: "#standard_declares" - include: "#class_block" - include: "#struct_block" - include: "#union_block" - include: "#enum_block" - - include: "#extern_block" + - include: "#template_isolated_definition" + - include: "#template_definition" + - include: "#access_control_keywords" + - include: "#block" + - include: "#static_assert" + - include: "#assembly" + - include: "#evaluation_context" function_body_context: patterns: - - include: "#type_casting_operators" - - include: "#function_call" - - include: "#struct_declare" - - include: "#special_block_context" - - include: "#macro_argument" - - include: "#string_context" - - include: "#functional_specifiers_pre_parameters" - - include: "#qualifiers_and_specifiers_post_parameters" - - include: "#storage_specifiers" + - include: "#ever_present_context" + - include: "#using_namespace" + - include: "#type_alias" + - include: "#using_name" + - include: "#namespace_alias" + - include: "#typedef_class" + - include: "#typedef_struct" + - include: "#typedef_union" + - include: "#typedef_keyword" + - include: "#standard_declares" + - include: "#class_block" + - include: "#struct_block" + - include: "#union_block" + - include: "#enum_block" - include: "#access_control_keywords" - - include: "#exception_keywords" + - include: "#block" - include: "#static_assert" - - include: "#other_keywords" - - include: "#memory_operators" - - include: "#using_name" - - include: "#the_this_keyword" - - include: "#language_constants" - - include: "#template_isolated_definition" - - include: "#template_definition" - - include: "#misc_storage_modifiers_1" - - include: "#destructor" - - include: "#lambdas" - - include: "#preprocessor_context" - - include: "#comments_context" - - include: "#switch_statement" - - include: "#control_flow_keywords" - include: "#assembly" - - include: "#misc_storage_modifiers_2" - - include: "#operator_overload" + - include: "#switch_statement" + - include: "#evaluation_context" + evaluation_context: + patterns: + - include: "#ever_present_context" + - include: "#string_context" - include: "#number_literal" - include: "#string_context_c" - - include: "#meta_preprocessor_macro" - - include: "#meta_preprocessor_diagnostic" - - include: "#meta_preprocessor_include" - - include: "#pragma_mark" - - include: "#meta_preprocessor_line" - - include: "#meta_preprocessor_undef" - - include: "#meta_preprocessor_pragma" + - include: "#method_access" + - include: "#member_access" + - include: "#predefined_macros" - include: "#operators" - - include: "#block" - - include: "#parentheses" + - include: "#memory_operators" + - include: "#wordlike_operators" - include: "#type_casting_operators" - - include: "#scope_resolution_inner_generated" + - include: "#control_flow_keywords" + - include: "#exception_keywords" + - include: "#the_this_keyword" + - include: "#language_constants" + - include: "#qualifiers_and_specifiers_post_parameters" + - include: "#functional_specifiers_pre_parameters" - include: "#storage_types" - - include: "#line_continuation_character" + - include: "#misc_storage_modifiers" + - include: "#lambdas" + - include: "#attributes_context" + - include: "#c_style_type_casting" + - include: "#parentheses" + - include: "#function_call" + - include: "#scope_resolution_inner_generated" - include: "#square_brackets" - include: "#empty_square_brackets" - include: "#semicolon" - include: "#comma" - preprocessor_context: - patterns: - - include: "#preprocessor_rule_enabled" - - include: "#preprocessor_rule_disabled" - - include: "#preprocessor_rule_conditional" - - include: "#hacky_fix_for_stray_directive" - storage_types: - patterns: - - include: "#storage_specifiers" - - include: "#primitive_types" - - include: "#non_primitive_types" - - include: "#pthread_types" - - include: "#posix_reserved_types" - - include: "#decltype" function_parameter_context: patterns: - - include: "#parameter_struct" - - include: "#probably_a_parameter" + - include: "#decltype" + - include: "#function_pointer_parameter" + - include: "#parameter" + - include: "#over_qualified_types" - include: "#attributes_context" - include: "#comments_context" - - include: "#storage_types" - - include: "#vararg_ellipses" - - include: "#function_pointer_parameter" - include: "#comma" - - include: "#language_constants" - - include: "#number_literal" - - include: "#string_context" - - include: "#operators" - evaluation_context: - patterns: - - include: "#root_context" - conditional_context: - patterns: - - include: "#root_context" template_definition_context: patterns: - include: "#scope_resolution_template_definition_inner_generated" @@ -272,6 +271,14 @@ - include: "#gcc_attributes" - include: "#ms_attributes" - include: "#alignas_attribute" + storage_types: + patterns: + - include: "#storage_specifiers" + - include: "#primitive_types" + - include: "#non_primitive_types" + - include: "#pthread_types" + - include: "#posix_reserved_types" + - include: "#decltype" source_wrapper: patterns: - name: source.cpp @@ -283,7 +290,7 @@ begin: "(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()" beginCaptures: '1': name: keyword.operator.functionlike.cpp keyword.other.decltype.cpp storage.type.decltype.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.decltype.cpp end: "(\\))" endCaptures: @@ -469,18 +485,18 @@ name: storage.modifier.specifier.functional.post-parameters.$0.cpp storage_specifiers: match: "(?\\s*$)" + match: "(?\\s*$)" captures: '1': name: storage.type.template.cpp @@ -765,7 +784,7 @@ - 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*([=])" + 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 @@ -774,13 +793,13 @@ '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*(?:(,)|(?=>|$))" + 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': 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})))*" + - 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: storage.type.template.argument.$0.cpp '3': name: entity.name.type.template.cpp @@ -793,13 +812,13 @@ '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*+" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*))?(::)" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: @@ -813,13 +832,13 @@ '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*+" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*))?(::)" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: @@ -833,13 +852,13 @@ '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*+" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*))?(::)" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: @@ -853,13 +872,13 @@ '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*+" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*))?(::)" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: @@ -873,13 +892,13 @@ '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*+" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*))?(::)" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: @@ -893,13 +912,13 @@ '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*+" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*))?(::)" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: @@ -913,13 +932,13 @@ '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*+" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*))?(::)" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: @@ -933,13 +952,13 @@ '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*+" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*))?(::)" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: @@ -952,14 +971,34 @@ - include: "#template_call_range" '4': name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp + scope_resolution_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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?::)*\\s*+" + captures: + '0': + patterns: + - include: "#scope_resolution_parameter_inner_generated" + scope_resolution_parameter_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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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_parameter_inner_generated" + '2': + name: entity.name.scope-resolution.parameter.cpp + '3': + name: meta.template.call.cpp + patterns: + - include: "#template_call_range" + '4': + name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.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*+" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*))?(::)" + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: @@ -973,13 +1012,14 @@ '4': name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp qualified_type: - match: "\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.])" + match: "((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.])" captures: '0': name: meta.qualified_type.cpp patterns: - match: "(?:class|struct|union|enum)" name: storage.type.$0.cpp + - include: "#attributes_context" - include: "#function_type" - include: "#storage_types" - include: "#number_literal" @@ -987,27 +1027,63 @@ - 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})))*" + - 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: "#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: "#attributes_context" - include: "#number_literal" - '3': + '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': + patterns: + - include: "#inline_comment" + '11': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '12': + name: comment.block.cpp + '13': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '15': patterns: - include: "#scope_resolution_inner_generated" - '4': + '16': name: entity.name.scope-resolution.cpp - '5': + '17': name: meta.template.call.cpp patterns: - include: "#template_call_range" - '6': + '18': name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp - '7': - name: entity.name.type.cpp - type_alias: - match: "(using)\\s*(?!namespace)(\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))|(.+(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))\\s*(\\=)\\s*((?:typename)?)\\s*((?:(?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))|(.+(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)(?:(\\[)(\\w*)(\\])\\s*)?\\s*(?:(;)|\\n)" captures: '1': name: keyword.other.using.directive.cpp @@ -1016,6 +1092,7 @@ patterns: - match: "(?:class|struct|union|enum)" name: storage.type.$0.cpp + - include: "#attributes_context" - include: "#function_type" - include: "#storage_types" - include: "#number_literal" @@ -1023,37 +1100,74 @@ - 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})))*" + - 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 '3': + patterns: + - include: "#inline_comment" + '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': patterns: - include: "#attributes_context" - include: "#number_literal" - '5': + '8': + patterns: + - include: "#inline_comment" + '9': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '10': + name: comment.block.cpp + '11': + name: comment.block.cpp punctuation.definition.comment.end.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 + '17': patterns: - include: "#scope_resolution_inner_generated" - '6': + '18': name: entity.name.scope-resolution.cpp - '7': + '19': name: meta.template.call.cpp patterns: - include: "#template_call_range" - '8': + '20': name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp - '9': + '21': + patterns: + - include: "#inline_comment" + '22': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '23': + name: comment.block.cpp + '24': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '25': name: entity.name.type.cpp - '10': + '26': name: keyword.operator.assignment.cpp - '11': + '27': name: keyword.other.typename.cpp - '12': + '28': patterns: - include: "#storage_specifiers" - '13': + '29': name: meta.qualified_type.cpp patterns: - match: "(?:class|struct|union|enum)" name: storage.type.$0.cpp + - include: "#attributes_context" - include: "#function_type" - include: "#storage_types" - include: "#number_literal" @@ -1061,80 +1175,124 @@ - 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})))*" + - 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 - '14': + '30': + patterns: + - include: "#inline_comment" + '31': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '32': + name: comment.block.cpp + '33': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '34': patterns: - include: "#attributes_context" - include: "#number_literal" - '16': + '35': + patterns: + - include: "#inline_comment" + '36': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '37': + name: comment.block.cpp + '38': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '39': + patterns: + - include: "#inline_comment" + '40': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '41': + name: comment.block.cpp + '42': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '44': patterns: - include: "#scope_resolution_inner_generated" - '17': + '45': name: entity.name.scope-resolution.cpp - '18': + '46': name: meta.template.call.cpp patterns: - include: "#template_call_range" - '19': + '47': name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp - '20': + '48': + patterns: + - include: "#inline_comment" + '49': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '50': + name: comment.block.cpp + '51': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '52': name: entity.name.type.cpp - '21': + '53': name: meta.declaration.type.alias.value.unknown.cpp patterns: - include: "#evaluation_context" - '23': + '55': + patterns: + - include: "#inline_comment" + '56': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '57': + name: comment.block.cpp + '58': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '59': name: storage.modifier.pointer.cpp - '24': + '60': + patterns: + - include: "#inline_comment" + '61': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '62': + name: comment.block.cpp + '63': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '64': name: storage.modifier.reference.cpp - '25': + '65': + patterns: + - include: "#inline_comment" + '66': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '67': + name: comment.block.cpp + '68': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '69': + patterns: + - include: "#inline_comment" + '70': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '71': + name: comment.block.cpp + '72': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '73': name: punctuation.definition.begin.bracket.square.cpp - '26': + '74': patterns: - include: "#evaluation_context" - '27': + '75': name: punctuation.definition.end.bracket.square.cpp - '28': + '76': name: punctuation.terminator.statement.cpp name: meta.declaration.type.alias.cpp - struct_declare: - match: "(struct)\\s+((?])\\s*\\(\\s*(((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)\\)(?!\\s*(;))" captures: '1': - name: storage.type.struct.parameter.cpp - '2': - name: entity.name.type.struct.parameter.cpp - '4': - name: storage.modifier.pointer.cpp - '5': - name: storage.modifier.reference.cpp - '6': - name: variable.other.object.declare.cpp - function_definition: - name: meta.function.definition.cpp - begin: "((\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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 + - include: "#inline_comment" + '37': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '38': + name: comment.block.cpp + '39': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '40': 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*+(?=\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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" - function_pointer_parameter: - begin: "(\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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.parameter.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*(?!(?:auto|void|char|short|int|signed|unsigned|long|float|double|bool|wchar_t|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t))(?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\())" + beginCaptures: + '1': + name: meta.head.function.definition.cpp + '2': + name: meta.qualified_type.cpp + patterns: + - match: "(?:class|struct|union|enum)" + name: storage.type.$0.cpp + - include: "#attributes_context" + - 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 + '3': + patterns: + - include: "#inline_comment" + '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': + patterns: + - include: "#attributes_context" + - include: "#number_literal" + '8': + patterns: + - include: "#inline_comment" + '9': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '10': + name: comment.block.cpp + '11': + name: comment.block.cpp punctuation.definition.comment.end.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 + '17': + patterns: + - include: "#scope_resolution_inner_generated" + '18': + name: entity.name.scope-resolution.cpp + '19': + name: meta.template.call.cpp + patterns: + - include: "#template_call_range" + '20': + name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp + '21': + patterns: + - include: "#inline_comment" + '22': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '23': + name: comment.block.cpp + '24': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '25': + name: entity.name.type.cpp + '27': + patterns: + - include: "#inline_comment" + '28': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '29': + name: comment.block.cpp + '30': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '31': + name: storage.modifier.pointer.cpp + '32': + patterns: + - include: "#inline_comment" + '33': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '34': + name: comment.block.cpp + '35': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '36': + name: storage.modifier.reference.cpp + '37': + patterns: + - include: "#inline_comment" + '38': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '39': + name: comment.block.cpp + '40': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '41': + patterns: + - include: "#inline_comment" + '42': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '43': + name: comment.block.cpp + '44': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '45': + patterns: + - include: "#scope_resolution_function_definition_inner_generated" + '46': + name: entity.name.function.definition.cpp + '47': + patterns: + - include: "#inline_comment" + '48': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '49': + name: comment.block.cpp + '50': + name: comment.block.cpp punctuation.definition.comment.end.cpp + end: "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))" + patterns: + - name: meta.head.function.definition.cpp + begin: "\\G ?" + end: "((?:\\{|<%|\\?\\?<|(?=;)))" + endCaptures: + '1': + name: punctuation.section.block.begin.bracket.curly.function.definition.cpp + patterns: + - include: "#ever_present_context" + - 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: "#evaluation_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: "#evaluation_context" + function_call: + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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}))*)\\b(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?]*|[^>]*+<[^>]*+>)++>\\s*)?(\\()" + beginCaptures: + '1': + patterns: + - include: "#scope_resolution_function_call_inner_generated" + '2': + name: entity.name.function.call.cpp + '3': + patterns: + - include: "#inline_comment" + '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: meta.template.call.cpp + patterns: + - include: "#template_call_range" + '8': + 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: "#evaluation_context" + operators: + patterns: + - include: "#sizeof_operator" + - include: "#alignof_operator" + - include: "#alignas_operator" + - include: "#typeid_operator" + - match: "--" + name: keyword.operator.decrement.cpp + - match: "\\+\\+" + name: keyword.operator.increment.cpp + - 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 + - include: "#ternary_operator" + wordlike_operators: + match: "(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)(\\()(\\*)\\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: "#attributes_context" + - 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: "#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: + - 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 + '16': + patterns: + - include: "#scope_resolution_inner_generated" + '17': + name: entity.name.scope-resolution.cpp + '18': + name: meta.template.call.cpp + patterns: + - include: "#template_call_range" + '19': + name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp + '20': + patterns: + - include: "#inline_comment" + '21': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '22': + name: comment.block.cpp + '23': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '24': + name: entity.name.type.cpp + '26': + patterns: + - include: "#inline_comment" + '27': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '28': + name: comment.block.cpp + '29': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '30': + name: storage.modifier.pointer.cpp + '31': + patterns: + - include: "#inline_comment" + '32': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '33': + name: comment.block.cpp + '34': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '35': + name: storage.modifier.reference.cpp + '36': + patterns: + - include: "#inline_comment" + '37': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '38': + name: comment.block.cpp + '39': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '40': + patterns: + - include: "#inline_comment" + '41': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '42': + name: comment.block.cpp + '43': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '44': + name: punctuation.section.parens.begin.bracket.round.function.pointer.cpp + '45': + name: punctuation.definition.function.pointer.dereference.cpp + '46': + name: variable.other.definition.pointer.function.cpp + '47': + name: punctuation.definition.begin.bracket.square.cpp + '48': + patterns: + - include: "#evaluation_context" + '49': + name: punctuation.definition.end.bracket.square.cpp + '50': + name: punctuation.section.parens.end.bracket.round.function.pointer.cpp + '51': + 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" + function_pointer_parameter: + begin: "(((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)((?:[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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)((?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.]))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)(\\()(\\*)\\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: "#attributes_context" + - 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: "#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: + - 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 + '16': + patterns: + - include: "#scope_resolution_inner_generated" + '17': + name: entity.name.scope-resolution.cpp + '18': + name: meta.template.call.cpp + patterns: + - include: "#template_call_range" + '19': + name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp + '20': + patterns: + - include: "#inline_comment" + '21': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '22': + name: comment.block.cpp + '23': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '24': + name: entity.name.type.cpp + '26': + patterns: + - include: "#inline_comment" + '27': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '28': + name: comment.block.cpp + '29': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '30': + name: storage.modifier.pointer.cpp + '31': + patterns: + - include: "#inline_comment" + '32': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '33': + name: comment.block.cpp + '34': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '35': + name: storage.modifier.reference.cpp + '36': + patterns: + - include: "#inline_comment" + '37': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '38': + name: comment.block.cpp + '39': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '40': + patterns: + - include: "#inline_comment" + '41': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '42': + name: comment.block.cpp + '43': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '44': + name: punctuation.section.parens.begin.bracket.round.function.pointer.cpp + '45': + name: punctuation.definition.function.pointer.dereference.cpp + '46': + name: variable.parameter.pointer.function.cpp + '47': + name: punctuation.definition.begin.bracket.square.cpp + '48': + patterns: + - include: "#evaluation_context" + '49': + name: punctuation.definition.end.bracket.square.cpp + '50': + name: punctuation.section.parens.end.bracket.round.function.pointer.cpp + '51': + 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" + parameter: + name: meta.parameter.cpp + begin: "(?:(?:(?:(?:(?:(?:(?:((?]*|[^>]*+<[^>]*+>)++>\\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}))*))" + 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: storage.modifier.specifier.$5.cpp + '6': + name: entity.name.scope-resolution.parameter.cpp + '7': + name: entity.name.type.parameter.cpp + end: "(?:(?=\\))|(,))" + endCaptures: + '1': + name: comma.cpp punctuation.separator.delimiter.cpp + patterns: + - include: "#storage_types" + - include: "#scope_resolution_parameter_inner_generated" + - include: "#vararg_ellipses" + - include: "#function_pointer_parameter" + - 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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\=))" + beginCaptures: + '1': + name: variable.parameter.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: variable.parameter.defaulted.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 + '11': + name: keyword.operator.assignment.default.cpp + end: "(?:(?=\\))|(,))" + endCaptures: + '1': + name: comma.cpp punctuation.separator.delimiter.cpp + patterns: + - include: "#evaluation_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}))*" + name: entity.name.type.parameter.cpp + - include: "#template_call_range" + - match: "(?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?" + 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: storage.modifier.pointer.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 + '10': + name: storage.modifier.reference.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': + 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 + 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\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*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\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: "#evaluation_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: "#ever_present_context" + - 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*+(?:(?]*|[^>]*+<[^>]*+>)++>\\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: "#the_this_keyword" + - 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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?=\\]|\\z|$)|(,))|(\\=))" + captures: + '1': + name: variable.parameter.capture.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: comma.cpp punctuation.separator.delimiter.cpp + '7': + name: keyword.operator.assignment.cpp + - include: "#evaluation_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" + enumerator_list: + 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" + inheritance_context: + patterns: + - match: "," + name: comma.cpp punctuation.separator.delimiter.inheritance.cpp + - match: "(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\s*)?(?![\\w<:.])))" + captures: + '1': + name: entity.name.type.inherited.cpp + class_block: + name: meta.block.class.cpp + begin: "((((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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: "#inline_comment" + '6': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '7': + name: comment.block.cpp + '8': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '9': + name: entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp + '10': + patterns: + - include: "#inline_comment" + '11': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '12': + name: comment.block.cpp + '13': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '14': + patterns: + - include: "#attributes_context" + - include: "#number_literal" + '15': + name: entity.name.type.$3.cpp + '16': + name: storage.type.modifier.final.cpp + '17': + name: colon.cpp punctuation.separator.inheritance.cpp + '18': + patterns: + - include: "#inheritance_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: "#ever_present_context" + - include: "#inheritance_context" + - include: "#template_call_range" + - 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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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: "#inline_comment" + '6': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '7': + name: comment.block.cpp + '8': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '9': + name: entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp + '10': + patterns: + - include: "#inline_comment" + '11': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '12': + name: comment.block.cpp + '13': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '14': + patterns: + - include: "#attributes_context" + - include: "#number_literal" + '15': + name: entity.name.type.$3.cpp + '16': + name: storage.type.modifier.final.cpp + '17': + name: colon.cpp punctuation.separator.inheritance.cpp + '18': + patterns: + - include: "#inheritance_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: "#ever_present_context" + - include: "#inheritance_context" + - include: "#template_call_range" + - 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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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: "#inline_comment" + '6': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '7': + name: comment.block.cpp + '8': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '9': + name: entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp + '10': + patterns: + - include: "#inline_comment" + '11': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '12': + name: comment.block.cpp + '13': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '14': + patterns: + - include: "#attributes_context" + - include: "#number_literal" + '15': + name: entity.name.type.$3.cpp + '16': + name: storage.type.modifier.final.cpp + '17': + name: colon.cpp punctuation.separator.inheritance.cpp + '18': + patterns: + - include: "#inheritance_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: "#ever_present_context" + - include: "#inheritance_context" + - include: "#template_call_range" + - 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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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: "#inline_comment" + '6': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '7': + name: comment.block.cpp + '8': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '9': + name: entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp + '10': + patterns: + - include: "#inline_comment" + '11': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '12': + name: comment.block.cpp + '13': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '14': + patterns: + - include: "#attributes_context" + - include: "#number_literal" + '15': + name: entity.name.type.$3.cpp + '16': + name: storage.type.modifier.final.cpp + '17': + name: colon.cpp punctuation.separator.inheritance.cpp + '18': + patterns: + - include: "#inheritance_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: "#ever_present_context" + - include: "#inheritance_context" + - include: "#template_call_range" + - 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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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: "#inline_comment" + '6': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '7': + name: comment.block.cpp + '8': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '9': + name: entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp + '10': + patterns: + - include: "#inline_comment" + '11': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '12': + name: comment.block.cpp + '13': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '14': + patterns: + - include: "#attributes_context" + - include: "#number_literal" + '15': + name: entity.name.type.$3.cpp + '16': + name: storage.type.modifier.final.cpp + '17': + name: colon.cpp punctuation.separator.inheritance.cpp + '18': + patterns: + - include: "#inheritance_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: "#ever_present_context" + - include: "#inheritance_context" + - include: "#template_call_range" + - 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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(DLLEXPORT)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?\\s*((?:(?\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\(\\(.*?\\)\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:(?:(?:short|signed|unsigned|long)|(?:class|struct|union|enum))(?:(?:(?:(?>\\s+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\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*+)(?:(?:[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+)|(?:\\/\\*)(?:.+?)(?:\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?!(?:not|compl|sizeof|new|delete|not_eq|bitand|xor|bitor|and|or|throw|and_eq|xor_eq|or_eq|alignof|alignas|typeid|noexcept|static_cast|dynamic_cast|const_cast|reinterpret_cast|while|for|do|if|else|goto|switch|try|catch|return|break|case|continue|default|NULL|true|false|nullptr|const|static|volatile|register|restrict|extern|inline|constexpr|mutable|friend|explicit|virtual|final|override|volatile|const|noexcept|constexpr|mutable|constexpr|consteval|private|protected|public|if|elif|else|endif|ifdef|ifndef|define|undef|include|line|error|warning|pragma|_Pragma|defined|__has_include|__has_cpp_attribute|this|template|namespace|using|operator|typedef|decltype|typename|asm|__asm__|concept|requires|export|thread_local|atomic_cancel|atomic_commit|atomic_noexcept|co_await|co_return|co_yield|import|module|reflexpr|synchronized|audit|axiom|transaction_safe|transaction_safe_dynamic)\\b)(?:(?:[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(?:(?]*|[^>]*+<[^>]*+>)++>\\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: "#inline_comment" + '6': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '7': + name: comment.block.cpp + '8': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '9': + name: entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp + '10': + patterns: + - include: "#inline_comment" + '11': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '12': + name: comment.block.cpp + '13': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '14': + patterns: + - include: "#attributes_context" + - include: "#number_literal" + '15': + name: entity.name.type.$3.cpp + '16': + name: storage.type.modifier.final.cpp + '17': + name: colon.cpp punctuation.separator.inheritance.cpp + '18': + patterns: + - include: "#inheritance_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: "#ever_present_context" + - include: "#inheritance_context" + - include: "#template_call_range" + - 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+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!final\\W|final\\$|override\\W|override\\$)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?!:)" + captures: + '1': + name: storage.type.struct.declare.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: entity.name.type.struct.cpp + '8': + patterns: + - include: "#inline_comment" + '9': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '10': + name: comment.block.cpp + '11': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '12': + name: storage.modifier.pointer.cpp + '13': + patterns: + - include: "#inline_comment" + '14': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '15': + name: comment.block.cpp + '16': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '17': + name: storage.modifier.reference.cpp + '18': + patterns: + - include: "#inline_comment" + '19': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '20': + name: comment.block.cpp + '21': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '22': + patterns: + - include: "#inline_comment" + '23': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '24': + name: comment.block.cpp + '25': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '26': + patterns: + - include: "#inline_comment" + '27': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '28': + name: comment.block.cpp + '29': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '30': + name: variable.other.object.declare.cpp + '31': + patterns: + - include: "#inline_comment" + '32': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '33': + name: comment.block.cpp + '34': + name: comment.block.cpp punctuation.definition.comment.end.cpp + union_declare: + match: "(union)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!final\\W|final\\$|override\\W|override\\$)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?!:)" + captures: + '1': + name: storage.type.union.declare.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: entity.name.type.union.cpp + '8': + patterns: + - include: "#inline_comment" + '9': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '10': + name: comment.block.cpp + '11': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '12': + name: storage.modifier.pointer.cpp + '13': + patterns: + - include: "#inline_comment" + '14': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '15': + name: comment.block.cpp + '16': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '17': + name: storage.modifier.reference.cpp + '18': + patterns: + - include: "#inline_comment" + '19': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '20': + name: comment.block.cpp + '21': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '22': + patterns: + - include: "#inline_comment" + '23': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '24': + name: comment.block.cpp + '25': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '26': + patterns: + - include: "#inline_comment" + '27': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '28': + name: comment.block.cpp + '29': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '30': + name: variable.other.object.declare.cpp + '31': + patterns: + - include: "#inline_comment" + '32': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '33': + name: comment.block.cpp + '34': + name: comment.block.cpp punctuation.definition.comment.end.cpp + enum_declare: + match: "(enum)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!final\\W|final\\$|override\\W|override\\$)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?!:)" + captures: + '1': + name: storage.type.enum.declare.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: entity.name.type.enum.cpp + '8': + patterns: + - include: "#inline_comment" + '9': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '10': + name: comment.block.cpp + '11': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '12': + name: storage.modifier.pointer.cpp + '13': + patterns: + - include: "#inline_comment" + '14': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '15': + name: comment.block.cpp + '16': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '17': + name: storage.modifier.reference.cpp + '18': + patterns: + - include: "#inline_comment" + '19': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '20': + name: comment.block.cpp + '21': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '22': + patterns: + - include: "#inline_comment" + '23': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '24': + name: comment.block.cpp + '25': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '26': + patterns: + - include: "#inline_comment" + '27': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '28': + name: comment.block.cpp + '29': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '30': + name: variable.other.object.declare.cpp + '31': + patterns: + - include: "#inline_comment" + '32': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '33': + name: comment.block.cpp + '34': + name: comment.block.cpp punctuation.definition.comment.end.cpp + class_declare: + match: "(class)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!final\\W|final\\$|override\\W|override\\$)((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?!:)" + captures: + '1': + name: storage.type.class.declare.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: entity.name.type.class.cpp + '8': + patterns: + - include: "#inline_comment" + '9': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '10': + name: comment.block.cpp + '11': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '12': + name: storage.modifier.pointer.cpp + '13': + patterns: + - include: "#inline_comment" + '14': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '15': + name: comment.block.cpp + '16': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '17': + name: storage.modifier.reference.cpp + '18': + patterns: + - include: "#inline_comment" + '19': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '20': + name: comment.block.cpp + '21': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '22': + patterns: + - include: "#inline_comment" + '23': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '24': + name: comment.block.cpp + '25': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '26': + patterns: + - include: "#inline_comment" + '27': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '28': + name: comment.block.cpp + '29': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '30': + name: variable.other.object.declare.cpp + '31': + patterns: + - include: "#inline_comment" + '32': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '33': + name: comment.block.cpp + '34': + name: comment.block.cpp punctuation.definition.comment.end.cpp + standard_declares: + patterns: + - include: "#struct_declare" + - include: "#union_declare" + - include: "#enum_declare" + - include: "#class_declare" + parameter_struct: + match: "(struct)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\[((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?(?=,|\\)|\\n)" captures: '1': - name: variable.other.enummember.cpp + name: storage.type.struct.parameter.cpp '2': patterns: - - include: "#attributes_context" - - include: "#number_literal" + - include: "#inline_comment" '3': - name: keyword.operator.assignment.cpp + name: comment.block.cpp punctuation.definition.comment.begin.cpp '4': - patterns: - - include: "#evaluation_context" + name: comment.block.cpp '5': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '6': + name: entity.name.type.struct.parameter.cpp + '7': patterns: - - include: "#comma" - - include: "#semicolon" - name: meta.enum.definition.cpp - enum_block: - name: meta.block.enum.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*((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\[((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?(?=,|\\)|\\n)" + captures: '1': - name: meta.head.enum.cpp + name: storage.type.enum.parameter.cpp '2': - name: storage.type.enum.cpp + patterns: + - include: "#inline_comment" '3': - name: storage.type.enum.enum-key.$3.cpp + name: comment.block.cpp punctuation.definition.comment.begin.cpp '4': - patterns: - - include: "#attributes_context" - - include: "#number_literal" + name: comment.block.cpp '5': - name: entity.name.type.enum.cpp + name: comment.block.cpp punctuation.definition.comment.end.cpp '6': - name: colon.cpp punctuation.separator.type-specifier.cpp - '8': + name: entity.name.type.enum.parameter.cpp + '7': patterns: - - include: "#scope_resolution_inner_generated" + - include: "#inline_comment" + '8': + name: comment.block.cpp punctuation.definition.comment.begin.cpp '9': - name: entity.name.scope-resolution.cpp + name: comment.block.cpp '10': - name: meta.template.call.cpp - patterns: - - include: "#template_call_range" - '11': - name: punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp + name: comment.block.cpp punctuation.definition.comment.end.cpp '12': - name: storage.type.integral.$12.cpp - end: "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))" - endCaptures: + 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': + name: storage.modifier.pointer.cpp + '17': + patterns: + - include: "#inline_comment" + '18': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '19': + name: comment.block.cpp + '20': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '21': + name: storage.modifier.reference.cpp + '22': + patterns: + - include: "#inline_comment" + '23': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '24': + name: comment.block.cpp + '25': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '26': + patterns: + - include: "#inline_comment" + '27': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '28': + name: comment.block.cpp + '29': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '30': + name: variable.other.object.declare.cpp + '31': + patterns: + - include: "#inline_comment" + '32': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '33': + name: comment.block.cpp + '34': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '35': + patterns: + - include: "#inline_comment" + '36': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '37': + name: comment.block.cpp + '38': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '39': + patterns: + - include: "#inline_comment" + '40': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '41': + name: comment.block.cpp + '42': + name: comment.block.cpp punctuation.definition.comment.end.cpp + parameter_union: + match: "(union)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\[((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?(?=,|\\)|\\n)" + captures: '1': - name: punctuation.terminator.statement.cpp + name: storage.type.union.parameter.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" - inheritance_context: - patterns: - - match: "," - name: comma.cpp punctuation.separator.delimiter.inheritance.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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))" - beginCaptures: - '1': - name: meta.head.class.cpp + patterns: + - include: "#inline_comment" '3': - name: storage.type.$3.cpp + name: comment.block.cpp punctuation.definition.comment.begin.cpp '4': - patterns: - - include: "#attributes_context" - - include: "#number_literal" + name: comment.block.cpp '5': - patterns: - - include: "#attributes_context" - - include: "#number_literal" + name: comment.block.cpp punctuation.definition.comment.end.cpp '6': - name: entity.name.type.$3.cpp + name: entity.name.type.union.parameter.cpp '7': - name: storage.type.modifier.final.cpp + patterns: + - include: "#inline_comment" '8': - name: colon.cpp punctuation.separator.inheritance.cpp + name: comment.block.cpp punctuation.definition.comment.begin.cpp '9': + name: comment.block.cpp + '10': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '12': patterns: - - include: "#inheritance_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: "#inheritance_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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))" - beginCaptures: - '1': - name: meta.head.struct.cpp - '3': - name: storage.type.$3.cpp - '4': + - 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': + name: storage.modifier.pointer.cpp + '17': patterns: - - include: "#attributes_context" - - include: "#number_literal" - '5': + - include: "#inline_comment" + '18': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '19': + name: comment.block.cpp + '20': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '21': + name: storage.modifier.reference.cpp + '22': 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.inheritance.cpp - '9': + - include: "#inline_comment" + '23': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '24': + name: comment.block.cpp + '25': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '26': patterns: - - include: "#inheritance_context" - end: "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))" - endCaptures: + - include: "#inline_comment" + '27': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '28': + name: comment.block.cpp + '29': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '30': + name: variable.other.object.declare.cpp + '31': + patterns: + - include: "#inline_comment" + '32': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '33': + name: comment.block.cpp + '34': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '35': + patterns: + - include: "#inline_comment" + '36': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '37': + name: comment.block.cpp + '38': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '39': + patterns: + - include: "#inline_comment" + '40': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '41': + name: comment.block.cpp + '42': + name: comment.block.cpp punctuation.definition.comment.end.cpp + parameter_class: + match: "(class)((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?:\\*((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*)((?:&((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))){0,2})((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?)((?:(?\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\[((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]((?:(?:(?>\\s+)|(\\/\\*)(.+?)(\\*\\/))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))?(?=,|\\)|\\n)" + captures: '1': - name: punctuation.terminator.statement.cpp + name: storage.type.class.parameter.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: "#inheritance_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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))" - beginCaptures: - '1': - name: meta.head.union.cpp + patterns: + - include: "#inline_comment" '3': - name: storage.type.$3.cpp + name: comment.block.cpp punctuation.definition.comment.begin.cpp '4': - patterns: - - include: "#attributes_context" - - include: "#number_literal" + name: comment.block.cpp '5': - patterns: - - include: "#attributes_context" - - include: "#number_literal" + name: comment.block.cpp punctuation.definition.comment.end.cpp '6': - name: entity.name.type.$3.cpp + name: entity.name.type.class.parameter.cpp '7': - name: storage.type.modifier.final.cpp + patterns: + - include: "#inline_comment" '8': - name: colon.cpp punctuation.separator.inheritance.cpp + name: comment.block.cpp punctuation.definition.comment.begin.cpp '9': + name: comment.block.cpp + '10': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '12': patterns: - - include: "#inheritance_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: "#inheritance_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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\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.inheritance.cpp - '9': - patterns: - - include: "#inheritance_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 + - 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': + name: storage.modifier.pointer.cpp + '17': patterns: - - include: "#preprocessor_context" - - include: "#inheritance_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 + - include: "#inline_comment" + '18': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '19': + name: comment.block.cpp + '20': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '21': + name: storage.modifier.reference.cpp + '22': + patterns: + - include: "#inline_comment" + '23': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '24': + name: comment.block.cpp + '25': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '26': + patterns: + - include: "#inline_comment" + '27': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '28': + name: comment.block.cpp + '29': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '30': + name: variable.other.object.declare.cpp + '31': patterns: - - include: "#function_pointer" - - include: "#constructor_context" - - include: "#root_context" - - name: meta.tail.class.cpp - begin: "(?<=\\}|%>|\\?\\?>)[\\s\\n]*" - end: "[\\s\\n]*(?=;)" + - include: "#inline_comment" + '32': + name: comment.block.cpp punctuation.definition.comment.begin.cpp + '33': + name: comment.block.cpp + '34': + name: comment.block.cpp punctuation.definition.comment.end.cpp + '35': 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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))" + - name: string.quoted.double.cpp + contentName: meta.embedded.assembly.cpp + begin: (R?)(") 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.inheritance.cpp - '9': - patterns: - - include: "#inheritance_context" - end: "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))" + name: meta.encoding.cpp + '2': + name: punctuation.definition.string.begin.assembly.cpp + end: (") endCaptures: '1': - name: punctuation.terminator.statement.cpp - '2': - name: punctuation.terminator.statement.cpp + name: punctuation.definition.string.end.assembly.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: "#inheritance_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})))*)\\b(?]*|[^>]*+<[^>]*+>)++>\\s*)))?(?![\\w<:.]))))+)*))?))" + - include: source.asm + - include: source.x86 + - include: source.x86_64 + - include: source.arm + - include: "#backslash_escapes" + - include: "#string_escaped_char" + - match: "(?=not)possible" + - begin: "(\\()" 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.inheritance.cpp - '9': - patterns: - - include: "#inheritance_context" - end: "(?:(?:(?<=\\}|%>|\\?\\?>)\\s*(;)|(;))|(?=[;>\\[\\]=]))" + name: punctuation.section.parens.begin.bracket.round.assembly.inner.cpp + end: "(\\))" endCaptures: '1': - name: punctuation.terminator.statement.cpp - '2': - name: punctuation.terminator.statement.cpp + name: punctuation.section.parens.end.bracket.round.assembly.inner.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: "#inheritance_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*(\\))" + 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*::\\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 @@ -2891,7 +4501,7 @@ string_context: patterns: - name: string.quoted.double.cpp - begin: ((u|u8|U|L)?") + begin: (((?:u|u8|U|L)?)") beginCaptures: '1': name: punctuation.definition.string.begin.cpp @@ -2906,13 +4516,13 @@ name: constant.character.escape.cpp - match: \\['"?\\abfnrtv] name: constant.character.escape.cpp - - match: "\\\\(?:[0-7]){1,3}" + - match: "\\\\[0-7]{1,3}" name: constant.character.escape.cpp - - match: "\\\\x(?:[0-9a-fA-F]){2,2}" + - match: "\\\\x[0-9a-fA-F]{2,2}" name: constant.character.escape.cpp - include: "#string_escapes_context_c" - name: string.quoted.single.cpp - begin: "((?=+!]+ | \\(\\) | - \\[\\]))\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" + - include: "#function_body_context" comments_context: patterns: - captures: @@ -3046,21 +4619,10 @@ '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" + - include: "#over_qualified_types" - match: !ruby/regexp /(?bug(bug); // bug -for (const auto [a, b] : c) - a->bug(bug); // bug \ No newline at end of file +int main() { + for (const auto &[a, b] : c) + a->bug(bug); // bug + for (const auto [a, b] : c) + a->bug(bug); // bug +} diff --git a/test/fixtures/issues/230.cpp b/test/fixtures/issues/230.cpp new file mode 100644 index 00000000..ed278970 --- /dev/null +++ b/test/fixtures/issues/230.cpp @@ -0,0 +1,7 @@ +void func() +{ + class var** thing = (class var**)func(); //comment + struct var** thing = (struct var**)func(); //comment + enum var** thing = (enum var**)func(); //comment + union var** thing = (union var**)func(); //comment +} \ No newline at end of file diff --git a/test/fixtures/issues/238.cpp b/test/fixtures/issues/238.cpp new file mode 100644 index 00000000..79d568b7 --- /dev/null +++ b/test/fixtures/issues/238.cpp @@ -0,0 +1 @@ +#define G_STATIC_ASSERT_EXPR(expr) ((void) sizeof (char[(expr) ? 1 : -1])) \ No newline at end of file diff --git a/test/fixtures/vscode/example.cpp b/test/fixtures/vscode/example.cpp new file mode 100644 index 00000000..b1c64f5a --- /dev/null +++ b/test/fixtures/vscode/example.cpp @@ -0,0 +1,631 @@ +#include +#include +// +// +// Constants +// +// + + + // + // Digits + // + // decimal + 1 + .1 + .239480 + .239480f + 0. + 0.f + 0.L + 0.LL + 4897430la + 32094.930123a + 4897430LL + 32094.930123F + 32094.930123f + 1'03'432'43 + 123232'1231321 + 3'20'94.93'01'23 + 3'20'94.93'1'23 + // e + 0e1 + 1e10f + 1.e10 + 1.e10 + 1.e-10 + 1.79769e+308 + 1.79'76'9e+3'0'8 + // octal + 01 + 01001202 + 010'0'120'2 + 0'1'2'3'4 + // binary + 0b101010 + 0b000001 + 0b100001 + 0b1'01'010 + 0b1'00'001 + // hex + 0x01 + 0xabcdef + 0xaBCDEf + 0xABCDEF + 0xAB.cdp5f + 0xAB.cdp5l + 0x20394afLL + 0x01 + 0xabc'def + 0xa'BC'DEf + 0xABC'DEF + 0x20'394'a'fLL + // hex floating point literal + 0x0.5p10F + 0x0.5p10f + 0x1ffp10 + 0x0.23p10 + 0x0.234985p10L + 0x139804.234985p10L + 0x0.53'84'92p10 + 0x5.p10 + 0x0.23p+10 + 0x0.234985p+10L + 0x139804.234985p-10L + 0x0.53'84'92p-10 + 0x5.p+10 + 0x13'98'04.234985p10L + // custom literals + 29042ms + 0xabcdefmm + 0xabc'defmm + 0xabcdefyards + 20ounces + 2000miles + L"akdjfhald" + // invalid literals + 1Ex + 0xe+foo + 0x1Px + 0xAB.cdpfl + 0x12345'luyards + 0.'123 + 0'.123 + 1E'1 + 1'E1 + // odd valid literals + 0x12345luyards + 0'12345 + 0x1Ex + 1Px + // + // chars + // + '1' + 'a' + '\n' + '\0' + // + // Strings + // + auto a = "things\n\b\v\t"; + +// +// operator words +// + auto a = 1 and 1; + auto a = 1 or 1; + auto a = 1 xor 1; + +// +// type castings +// + dynamic_cast (expression + 1 + thing); + reinterpret_cast (expression); + static_cast (expression); + const_cast (expression); + { + dynamic_cast (expression + 1 + thing); + reinterpret_cast (expression); + static_cast (expression); + const_cast (expression); + } + +// +// Storage types +// + pthread_rwlockattr_t thing; + pthread_rwlockattr_t thing; + decltype(int); + +// +// operators +// + typeid() + sizeof() + alignas() + +// +// Memory +// + auto a = new int(5); + delete a; + new (&a_storage_of_callable.callable) type(forward(a_callable)); + int *array = new int[100]; + delete[] array; + char should_always_be_a_newline; + char deleter; + +// +// +// namespaces +// +// + using namespace std; + using namespace std;using namespace std; + using namespace parent_namespace::std; + + + + inline namespace {}; + namespace {}; + namespace scoped::console { }; + namespace console { + template void __MAGIC__show(ANYTYPE input) { + // by default use the stream operator with cout + std::cout << input; + } + } + +// +// Scope resolution +// + std::cout << input; + numeric_limits::infinity(); + char_traits::eof(); + numeric_limits::max(); + Task::links_to; + &TEST_CLASS::name; + Event:: ListenersFor[input_event.name] + std::allocator_traits::destroy(acopy, this); + std::allocator_traits::deallocate(acopy, this); + +// +// member access +// + window.as.translate(0,0.5,0); + window.MV.translate(0,0.5,0); + a_pointer.thread; + a_pointer.*thread; + a_pointer->thread; + a_pointer->*thread; + a_pointer.thread.thing; + a_pointer.*thread.*thing; + a_pointer->thread->thing; + a_pointer->*thread->*thing; + a_pointer.thread->*thing; + a_pointer.*thread->thing; + a_pointer->thread.*thing; + a_pointer->*thread.thing; + a_pointer.thread[0]; + a_pointer.*thread[0]; + a_pointer->thread[0]; + a_pointer->*thread[0]; + a_pointer.thread[0]->*thing; + a_pointer.*thread[0]->thing; + a_pointer->thread[0].*thing; + a_pointer->*thread[0].thing; + a_pointer.thread(); + a_pointer.*thread(); + ptr_to_original->Start(); + ptr_to_original->*Start(); + a_pointer.thread()->*thing; + a_pointer.*thread()->thing; + ptr_to_original->Start().*thing; + ptr_to_original->*Start().thing; + { + a_pointer.thread[0]->*thing; + a_pointer.*thread[0]->thing; + a_pointer->thread[0].*thing; + a_pointer->*thread[0].thing; + a_pointer.thread; + a_pointer.*thread; + a_pointer->thread; + a_pointer->*thread; + } + { + a_pointer.thread(); + a_pointer.*thread(); + ptr_to_original->Start(); + ptr_to_original->*Start(); + } + +// +// Operator keyword +// + ostream& operator<<(ostream& out, const Item& input_) {}; + Item operator+( const string& base , const int& repetitions ) {}; + Item operator-( const int& the_input , const Item& input_item ) {}; + Item operator/( const Item& input_item , const int& the_input ) {}; + Item operator^( const Item& input_item , const int& the_input ) {}; + // implicit conversions + operator std::string() const {}; + operator double() const {}; + // custom literal + void operator "" _km(long double); + +// +// +// preprocessor +// +// + #define Infinite numeric_limits::infinity() + #define DoubleMax 1.79769e+308 + #define Pi 3.1415926535897932384626 + #define show(argument) cout << #argument << "\n"; + #ifndef CEKO_LIBRARY + #define CEKO_LIBRARY + #endif + +// +// templates +// + + void func() { + std::cout << max(a, b) << std::endl; + std::cout << max(a, b) << std::endl; + } + + namespace test { + template + #ifdef blah + struct test + #endif + { + // seperate line template + template > + template 1, typename Callable> + bool operator()(U k) {} + }; + + struct test2 { + // same-line template + template > bool operator()(U k) {} + }; + + struct test3 { + // same-line template + template > bool operator()(U k) {} + }; + + + struct test2 { + bool operator()() = delete; + }; + } // namespace test + + // no syntax highlighting + class test2 {}; + + template + auto internalConversionToFuncPtr(Callable&& a_callable, Ret (*)(Args...)) + { + static bool used = false; + static storage a_storage_of_callable; + using type = decltype(a_storage_of_callable.callable); + + if(used) { + a_storage_of_callable.callable.~type(); + } + new (&a_storage_of_callable.callable) type(forward(a_callable)); + used = true; + // lambda + return [](Args... args) -> Ret { + return Ret(a_storage_of_callable.callable(forward(args)...)); + }; + } + template + RETURN_TYPE* convertToFunctionPointer(Callable&& c) + { + return internalConversionToFuncPtr(forward(c), (RETURN_TYPE*)nullptr); + } + + +// +// Classes +// + class Thing { + public: + public : + private : + private: + protected: + auto a = 1; + Thing() { + + } + }; + struct Thing2 { + public: + public : + private : + private: + protected: + auto a = 1; + Thing() { + + } + }; + class A{ + void A(); + }; + class A +{ + void A(); +}; + class A { + void A(); + }; + class A + + +{ + void A(); +}; + class ClassA { +}; + + class ClassE final : public ClassA { + }; + + namespace foo { + class ClassF { + }; + + class ClassG { + }; +} + +class ClassH : public foo::ClassF, public foo::ClassG { +}; + + class foo : bar {}; + class foo : public bar {}; + + struct copy_storage_helper // copyableT + { + [[noreturn]] void operator()(pointerT /*ptr*/, const hashT& /*hf*/, pointerT /*ptr_old*/, size_t /*off*/, size_t /*cnt*/) const + { + // `allocatorT::value_type` is not copy-constructible. + // Throw an exception unconditionally, even when there is nothing to copy. + noadl::sprintf_and_throw("cow_hashmap: `%s` is not copy-constructible.", + typeid(typename allocatorT::value_type).name()); + } + }; + +// +// enums +// + enum{ thing }; + enum {}; + enum A { + a, b + }; + enum enum1 + { + // comment + definition /* block comment */, definition3 + definition, definition2 // comment + } + +// +// inheritance +// + + class foo : private bar,quix,foo, public bar, quix, foo, protected bar, quix{}; + struct foo f; + class foo f; + struct thing : + public A, public B {}; + + class thing : + public A, + public B, + {}; + + +// +// Functions +// + template + string ToBinary(ANYTYPE input) + { + // depends on #include + return bitset<8>(input).to_string(); + } + +// +// lambdas +// + auto a = [ a, b, c ] + (Args... args, int thing1) -> Ret + { + } + + [ a, b, c ] (Args... args, int thing1) mutable -> Ret { } + [ a, b, c ] (Args... args, int thing1) { } + [ a = stuff::blah[1324], b, c ] (Args... args, int thing1) { } + [ a, b, c ] { } + [=] -> int { } + [=] () mutable { return; } + auto a = thing[1][2]; + auto a = thing()[2]; + [](Args... args) -> Ret { + return Ret(a_storage_of_callable.callable(forward(args)...)); + }; + + + return [ a, b, c ] (Args... args, int thing1) -> Ret { } + return [ a, b, c ] -> int { } + + // + // not lambdas + // + test()[0] = 5; // no syntax highlighting; + test[5][5] = 5; + + + + +int main() { + int a = ( thing + 10) + return 0; +} + + + +// +// Attributes +// + switch (test) { + case 1: + break; + case 2: [[fallthrough]]; + case 3: break; // no syntax highlighting + } + switch(next) { + case '\'': + case '\"': + case '\\': + case '?': + { + value.push_back(next); + break; + } + case 'a': + { + value.push_back('\a'); + break; + } + case 'b': + { + value.push_back('\b'); + break; + } + case 'f': + { + value.push_back('\f'); + break; + } + case 'n': + { + value.push_back('\n'); + break; + } + case 'r': + { + value.push_back('\r'); + break; + } + case 't': + { + value.push_back('\t'); + break; + } + case 'v': + { + value.push_back('\v'); + break; + } + case '0': + { + value.push_back('\0'); + break; + } + case 'Z': + { + value.push_back('\x1A'); + break; + } + case 'e': + { + value.push_back('\x1B'); + break; + } + case 'U': + { + xcnt += 2; // 6: "\U123456" + } + // Fallthrough. + case 'u': + { + xcnt += 2; // 4: "\u1234" + } + // Fallthrough. + case 'x': + { + xcnt += 2; // 2: "\x12" + // Read hex digits. + if(qavail < xcnt + 2) { + throw do_make_parser_error(reader, reader.size_avail(), Parser_Error::code_escape_sequence_incomplete); + } + char32_t cpnt = 0; + for(auto i = tlen; i < tlen + xcnt; ++i) { + static constexpr char s_digits[] = "00112233445566778899AaBbCcDdEeFf"; + auto dptr = std::char_traits::find(s_digits, 32, bptr[i]); + if(!dptr) { + throw do_make_parser_error(reader, i + 1, Parser_Error::code_escape_sequence_invalid_hex); + } + auto dvalue = static_cast((dptr - s_digits) / 2); + cpnt = cpnt * 16 + dvalue; + } + if(next == 'x') { + // Write the character verbatim. + value.push_back(static_cast(cpnt)); + break; + } + // Write a Unicode code point. + if(((0xD800 <= cpnt) && (cpnt < 0xE000)) || (0x110000 <= cpnt)) { + // Code point value is reserved or too large. + throw do_make_parser_error(reader, tlen + xcnt, Parser_Error::code_escape_utf_code_point_invalid); + } + // Encode it. + auto encode_one = [&](unsigned shift, unsigned mask) + { + value.push_back(static_cast((~mask << 1) | ((cpnt >> shift) & mask))); + }; + if(cpnt < 0x80) { + encode_one( 0, 0xFF); + break; + } + if(cpnt < 0x800) { + encode_one( 6, 0x1F); + encode_one( 0, 0x3F); + break; + } + if(cpnt < 0x10000) { + encode_one(12, 0x0F); + encode_one( 6, 0x3F); + encode_one( 0, 0x3F); + break; + } + encode_one(18, 0x07); + encode_one(12, 0x3F); + encode_one( 6, 0x3F); + encode_one( 0, 0x3F); + break; + } + default: + thing; + } + void func1(); + [[noreturn]] void func2(/*syntax highlighting*/); // no syntax highlighting + struct st { // syntax highlighting works now + }; + void func3(); + +// Universal character name +class LineReader{}; +class Line_Reader{}; +class Line\u00b7Reader{}; +class Line\U0002070EReader{}; diff --git a/test/source/arguments.js b/test/source/arguments.js index b4615e48..1cd3008c 100644 --- a/test/source/arguments.js +++ b/test/source/arguments.js @@ -14,6 +14,11 @@ module.exports = require("yargs") describe: "generate spec files for all fixtures", type: "boolean" }) + .option("show-failure-only", { + default: false, + describe: "Only show IF a spec failed, no details", + type: "boolean" + }) .option("header-c", { default: false, type: "boolean", diff --git a/test/source/commands/report.js b/test/source/commands/report.js index f10eba23..b276bd74 100644 --- a/test/source/commands/report.js +++ b/test/source/commands/report.js @@ -30,7 +30,7 @@ async function collectRecords() { .readFileSync(test) .toString() .split("\n"); - await getTokens(registry, test, fixture, () => true); + await getTokens(registry, test, fixture, false, () => true); } console.log(); recorder.reportAllRecorders(); diff --git a/test/source/commands/test.js b/test/source/commands/test.js index 1eefb7c4..989438e4 100644 --- a/test/source/commands/test.js +++ b/test/source/commands/test.js @@ -33,7 +33,8 @@ async function runTests() { registry, path.relative(paths.fixtureDir, test.fixture), fixture, - yaml.safeLoad(spec, { filename: test.spec.default, json: true }) + yaml.safeLoad(spec, { filename: test.spec.default, json: true }), + argv["show-failure-only"] ); totalResult = result ? totalResult : result; console.groupEnd(); diff --git a/test/source/generate_spec.js b/test/source/generate_spec.js index 9b88aee9..728adf83 100644 --- a/test/source/generate_spec.js +++ b/test/source/generate_spec.js @@ -12,7 +12,7 @@ function removeScopeName(scope) { */ module.exports = async function generateSpec(path, fixture) { let spec = []; - await getTokens(registry, path, fixture, (line, token) => { + await getTokens(registry, path, fixture, false, (line, token) => { const source = line.substring(token.startIndex, token.endIndex); if (source.trim() === "") { return true; diff --git a/test/source/get_tokens.js b/test/source/get_tokens.js index f299f569..253aeb08 100644 --- a/test/source/get_tokens.js +++ b/test/source/get_tokens.js @@ -1,5 +1,6 @@ // get the tokens from the file and process them with the provided function const pa = require("path"); +const chalk = require("chalk"); const vsctm = require("vscode-textmate"); const argv = require("yargs").argv; @@ -7,9 +8,11 @@ const argv = require("yargs").argv; * @param {vsctm.Registry} registry * @param {string} path * @param {string[]} fixture + * @param {boolean} showFailureOnly * @param {(line: string, token: vsctm.IToken) => boolean} process */ -module.exports = async function(registry, path, fixture, process) { +module.exports = async function(registry, path, fixture, showFailureOnly, process) { + let displayedAtLeastOnce = false; let returnValue = true; try { let sourceName = "source.cpp"; @@ -50,7 +53,8 @@ module.exports = async function(registry, path, fixture, process) { } } if (displayLine) { - console.log("line was:\n %s:%d: |%s|", path, lineNumber, line); + showFailureOnly || console.log("line was:\n %s:%d: |%s|", path, lineNumber, line); + displayedAtLeastOnce = true; } lineNumber += 1; } @@ -58,5 +62,9 @@ module.exports = async function(registry, path, fixture, process) { console.error(e); returnValue = false; } + if (displayedAtLeastOnce) { + console.log(chalk.redBright(" Failed")) + } + return returnValue; }; diff --git a/test/source/registry.js b/test/source/registry.js index d47828cc..0f154438 100644 --- a/test/source/registry.js +++ b/test/source/registry.js @@ -39,9 +39,8 @@ function getRegistry(getOnigLib) { ); break; default: - return Promise.reject( - "requested non c/c++/objc/objc++ grammar" - ); + console.error("requested non c/c++/objc/objc++ grammar"); + return Promise.resolve({}); } return Promise.resolve( rewriteGrammar( diff --git a/test/source/spec_checker.js b/test/source/spec_checker.js index 0152c3dd..e859de61 100644 --- a/test/source/spec_checker.js +++ b/test/source/spec_checker.js @@ -11,7 +11,7 @@ function removeScopeName(scope) { } module.exports["SpecChecker"] = class SpecChecker { - constructor(spec) { + constructor(spec, showFailureOnly=false) { /** * @type {Spec[]} */ @@ -23,6 +23,10 @@ module.exports["SpecChecker"] = class SpecChecker { * @type {string[]} */ this.scopeStack = new Array("source"); + /** + * @type {bool} + */ + this.showFailureOnly = showFailureOnly; } /** * @param {string} line @@ -42,12 +46,12 @@ module.exports["SpecChecker"] = class SpecChecker { return true; } if (this.Specs.length === 0) { - console.error("ran out of specs"); + this.showFailureOnly || console.error("ran out of specs"); return false; } const spec = this.Specs.shift(); if (source !== spec.source) { - console.error( + this.showFailureOnly || console.error( "spec mismatch: next token is |%s| but spec has |%s|", source, spec.source @@ -62,33 +66,33 @@ module.exports["SpecChecker"] = class SpecChecker { if (_.isEqual(specScopes, tokenScopes)) { return true; } - console.group("scope mismatch: token |%s| has wrong scope", source); - console.log(); - console.group("scopes in spec"); + this.showFailureOnly || console.group("scope mismatch: token |%s| has wrong scope", source); + this.showFailureOnly || console.log(); + this.showFailureOnly || console.group("scopes in spec"); for (const scope of specScopes) { this.displayScope(scope, tokenScopes, specScopes); } - console.groupEnd(); - console.log(); - console.group("actual scopes"); + this.showFailureOnly || console.groupEnd(); + this.showFailureOnly || console.log(); + this.showFailureOnly || console.group("actual scopes"); for (const scope of tokenScopes) { this.displayScope(scope, tokenScopes, specScopes); } - console.log(); - console.groupEnd(); - console.groupEnd(); + this.showFailureOnly || console.log(); + this.showFailureOnly || console.groupEnd(); + this.showFailureOnly || console.groupEnd(); return false; } displayScope(scope, newScopes, oldScopes) { if (_.includes(newScopes, scope) && !_.includes(oldScopes, scope)) { - console.log(chalk.greenBright("+ " + scope)); + this.showFailureOnly || console.log(chalk.greenBright("+ " + scope)); } else if ( !_.includes(newScopes, scope) && _.includes(oldScopes, scope) ) { - console.log(chalk.redBright("- " + scope)); - } else console.log(chalk.whiteBright(" " + scope)); + this.showFailureOnly || console.log(chalk.redBright("- " + scope)); + } else this.showFailureOnly || console.log(chalk.whiteBright(" " + scope)); } /** diff --git a/test/source/test_runner.js b/test/source/test_runner.js index c25eb19f..587da5a7 100644 --- a/test/source/test_runner.js +++ b/test/source/test_runner.js @@ -7,9 +7,9 @@ const SpecChecker = require("./spec_checker").SpecChecker; * @param {string[]} fixture * @param {object} spec */ -module.exports = async function(registry, path, fixture, spec) { - const checker = new SpecChecker(spec); - return getTokens(registry, path, fixture, (line, token) => +module.exports = async function(registry, path, fixture, spec, showFailureOnly) { + const checker = new SpecChecker(spec, showFailureOnly); + return getTokens(registry, path, fixture, showFailureOnly, (line, token) => checker.checkToken(line, token) ); }; diff --git a/test/specs/features/assembly.c.yaml b/test/specs/features/assembly.c.yaml new file mode 100644 index 00000000..a227a03f --- /dev/null +++ b/test/specs/features/assembly.c.yaml @@ -0,0 +1,261 @@ +- source: asm + scopesBegin: + - meta.asm + scopes: + - storage.type.asm +- source: ( + scopes: + - punctuation.section.parens.begin.bracket.round.assembly +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: .globl func + scopesBegin: + - meta.embedded.assembly +- source: ' .type func, @function' +- source: ' func:' +- source: ' .cfi_startproc' +- source: ' movl $7, %eax' +- source: ' retl' +- source: ' .cfi_endproc' + scopesEnd: + - meta.embedded.assembly +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round.assembly + scopesEnd: + - meta.asm +- source: ; + scopes: + - punctuation.terminator.statement +- source: int + scopes: + - storage.type.built-in.primitive +- source: main + scopesBegin: + - meta.function + - meta.function.definition.parameters + scopes: + - entity.name.function +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round + scopesEnd: + - meta.function + - meta.function.definition.parameters +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: int + scopes: + - storage.type.built-in.primitive +- source: ' n ' +- source: = + scopes: + - keyword.operator.assignment +- source: func + scopesBegin: + - meta.function-call + scopes: + - entity.name.function +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round + scopesEnd: + - meta.function-call +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' extended inline assembly' + scopesEnd: + - comment.line.double-slash +- source: asm + scopesBegin: + - meta.function-call + - meta.asm + scopes: + - storage.type.asm +- source: ( + scopes: + - punctuation.section.parens.begin.bracket.round.assembly +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: 'leal (%0,%0,4),%0' + scopes: + - meta.embedded.assembly +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: ':' + scopes: + - punctuation.separator.delimiter.colon.assembly +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: =r + scopes: + - meta.embedded.assembly +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: ' (n' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round.assembly + scopesEnd: + - meta.function-call + - meta.asm +- source: ' : ' +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin +- source: '0' +- source: '"' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.double +- source: ( + scopesBegin: + - meta.parens.block + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'n' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens.block +- source: ) +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' standard inline assembly' + scopesEnd: + - comment.line.double-slash +- source: asm + scopesBegin: + - meta.function-call + - meta.asm + scopes: + - storage.type.asm +- source: ( + scopes: + - punctuation.section.parens.begin.bracket.round.assembly +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: 'movq $60, %rax' + scopesBegin: + - meta.embedded.assembly +- source: \n + scopesBegin: + - constant.character.escape +- source: \t + scopesEnd: + - meta.embedded.assembly + - constant.character.escape +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' the exit syscall number on Linux' + scopesEnd: + - comment.line.double-slash +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: 'movq $2, %rdi' + scopesBegin: + - meta.embedded.assembly +- source: \n + scopesBegin: + - constant.character.escape +- source: \t + scopesEnd: + - meta.embedded.assembly + - constant.character.escape +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' this program returns 2' + scopesEnd: + - comment.line.double-slash +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: syscall + scopes: + - meta.embedded.assembly +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round.assembly + scopesEnd: + - meta.function-call + - meta.asm +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly diff --git a/test/specs/features/assembly.cpp.yaml b/test/specs/features/assembly.cpp.yaml new file mode 100644 index 00000000..19b4eae6 --- /dev/null +++ b/test/specs/features/assembly.cpp.yaml @@ -0,0 +1,267 @@ +- source: asm + scopesBegin: + - source + - meta.asm + scopes: + - storage.type.asm +- source: ( + scopes: + - punctuation.section.parens.begin.bracket.round.assembly +- source: R + scopesBegin: + - string.quoted.double + scopes: + - meta.encoding +- source: '"' + scopes: + - punctuation.definition.string.begin.assembly +- source: ( + scopesBegin: + - meta.embedded.assembly +- source: .globl func +- source: ' .type func, @function' +- source: ' func:' +- source: ' .cfi_startproc' +- source: ' movl $7, %eax' +- source: ' retl' +- source: ' .cfi_endproc' +- source: ) + scopesEnd: + - meta.embedded.assembly +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round.assembly + scopesEnd: + - meta.asm +- source: ; + scopes: + - punctuation.terminator.statement +- source: int + scopesBegin: + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: main + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: int + scopesBegin: + - meta.body.function.definition + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' n ' +- source: = + scopes: + - keyword.operator.assignment +- source: func + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' extended inline assembly' + scopesEnd: + - comment.line.double-slash +- source: asm + scopesBegin: + - meta.asm + scopes: + - storage.type.asm +- source: ( + scopes: + - punctuation.section.parens.begin.bracket.round.assembly +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: 'leal (%0,%0,4),%0' + scopes: + - meta.embedded.assembly +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: ':' + scopes: + - punctuation.separator.delimiter.colon.assembly +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: =r + scopes: + - meta.embedded.assembly +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: ( + scopes: + - punctuation.section.parens.begin.bracket.round.assembly.inner +- source: 'n' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round.assembly.inner +- source: ':' + scopes: + - punctuation.separator.delimiter.colon.assembly +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: '0' + scopes: + - meta.embedded.assembly +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: ( + scopes: + - punctuation.section.parens.begin.bracket.round.assembly.inner +- source: 'n' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round.assembly.inner +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round.assembly + scopesEnd: + - meta.asm +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' standard inline assembly' + scopesEnd: + - comment.line.double-slash +- source: asm + scopesBegin: + - meta.asm + scopes: + - storage.type.asm +- source: ( + scopes: + - punctuation.section.parens.begin.bracket.round.assembly +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: 'movq $60, %rax' + scopesBegin: + - meta.embedded.assembly +- source: \n + scopesBegin: + - constant.character.escape +- source: \t + scopesEnd: + - meta.embedded.assembly + - constant.character.escape +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' the exit syscall number on Linux' + scopesEnd: + - comment.line.double-slash +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: 'movq $2, %rdi' + scopesBegin: + - meta.embedded.assembly +- source: \n + scopesBegin: + - constant.character.escape +- source: \t + scopesEnd: + - meta.embedded.assembly + - constant.character.escape +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' this program returns 2' + scopesEnd: + - comment.line.double-slash +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin.assembly +- source: syscall + scopes: + - meta.embedded.assembly +- source: '"' + scopes: + - punctuation.definition.string.end.assembly + scopesEnd: + - string.quoted.double +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round.assembly + scopesEnd: + - meta.asm +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition diff --git a/test/specs/features/c_style_casts.cpp.yaml b/test/specs/features/c_style_casts.cpp.yaml new file mode 100644 index 00000000..64467ba3 --- /dev/null +++ b/test/specs/features/c_style_casts.cpp.yaml @@ -0,0 +1,154 @@ +- source: void + scopesBegin: + - source + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: function + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: foo + scopesBegin: + - meta.body.function.definition + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: baz +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: foo + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ( + scopesBegin: + - meta.type.cast +- source: baz + scopes: + - meta.qualified_type + - entity.name.type +- source: ) + scopesEnd: + - meta.type.cast +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: foo + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ( + scopesBegin: + - meta.type.cast +- source: bar + scopes: + - meta.qualified_type + - entity.name.type +- source: ) + scopesEnd: + - meta.type.cast +- source: baz +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' foo ' +- source: = + scopes: + - keyword.operator.assignment +- source: ' (' + scopesBegin: + - meta.type.cast +- source: bar + scopes: + - meta.qualified_type + - entity.name.type +- source: ) + scopesEnd: + - meta.type.cast +- source: baz +- source: ; + scopes: + - punctuation.terminator.statement +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' foo ' +- source: = + scopes: + - keyword.operator.assignment +- source: new + scopes: + - keyword.operator.wordlike + - keyword.operator.new +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: bar +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: return + scopes: + - keyword.control.return +- source: ( + scopesBegin: + - meta.type.cast +- source: bar + scopes: + - meta.qualified_type + - entity.name.type +- source: ) + scopesEnd: + - meta.type.cast +- source: '0' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition diff --git a/test/specs/issues/003.cpp.yaml b/test/specs/issues/003.cpp.yaml index 9593f544..cdbc7b73 100644 --- a/test/specs/issues/003.cpp.yaml +++ b/test/specs/issues/003.cpp.yaml @@ -27,9 +27,12 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round -- source: 'bar ' +- source: bar scopesBegin: - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter - source: a scopes: - variable.parameter @@ -46,6 +49,7 @@ - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -106,9 +110,12 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round -- source: 'bar ' +- source: bar scopesBegin: - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter - source: a scopes: - variable.parameter @@ -125,6 +132,7 @@ - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round diff --git a/test/specs/issues/011.cpp.yaml b/test/specs/issues/011.cpp.yaml index 4df7ef2f..7ec70f0c 100644 --- a/test/specs/issues/011.cpp.yaml +++ b/test/specs/issues/011.cpp.yaml @@ -17,6 +17,7 @@ - source: const scopesBegin: - meta.function.definition.parameters + - meta.parameter scopes: - storage.modifier.specifier.const - source: char @@ -25,7 +26,7 @@ - storage.type.built-in.primitive - source: '*' scopes: - - keyword.operator + - storage.modifier.pointer - source: /* scopesBegin: - comment.block @@ -37,11 +38,12 @@ - punctuation.definition.comment.end scopesEnd: - comment.block -- source: ' some_var' +- source: some_var scopes: - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round diff --git a/test/specs/issues/015.cpp.yaml b/test/specs/issues/015.cpp.yaml index 4febb4ca..bff0443a 100644 --- a/test/specs/issues/015.cpp.yaml +++ b/test/specs/issues/015.cpp.yaml @@ -20,6 +20,7 @@ - source: ':' scopes: - colon + - punctuation.separator.delimiter.colon.access.control scopesEnd: - storage.type.modifier.access.control.public - source: '}' diff --git a/test/specs/issues/018.cpp.yaml b/test/specs/issues/018.cpp.yaml index 0c262b7c..ab6557b9 100644 --- a/test/specs/issues/018.cpp.yaml +++ b/test/specs/issues/018.cpp.yaml @@ -39,6 +39,9 @@ - source: ) scopes: - punctuation.section.arguments.end.bracket.round.operator.typeid +- source: ; + scopes: + - punctuation.terminator.statement - source: typeid scopes: - keyword.operator.functionlike @@ -54,6 +57,9 @@ - source: ) scopes: - punctuation.section.arguments.end.bracket.round.operator.typeid +- source: ; + scopes: + - punctuation.terminator.statement - source: sizeof scopes: - keyword.operator.functionlike @@ -68,6 +74,9 @@ - source: ) scopes: - punctuation.section.arguments.end.bracket.round.operator.sizeof +- source: ; + scopes: + - punctuation.terminator.statement - source: sizeof scopes: - keyword.operator.functionlike @@ -83,6 +92,9 @@ - source: ) scopes: - punctuation.section.arguments.end.bracket.round.operator.sizeof +- source: ; + scopes: + - punctuation.terminator.statement - source: decltype scopes: - keyword.operator.functionlike @@ -99,6 +111,9 @@ - source: ) scopes: - punctuation.section.arguments.end.bracket.round.decltype +- source: ; + scopes: + - punctuation.terminator.statement - source: using scopesBegin: - meta.declaration.type.alias @@ -138,8 +153,12 @@ scopes: - punctuation.section.arguments.end.bracket.round.decltype scopesEnd: - - meta.declaration.type.alias - meta.declaration.type.alias.value.unknown +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.declaration.type.alias - source: '}' scopes: - punctuation.section.block.end.bracket.curly.function.definition diff --git a/test/specs/issues/026.cpp.yaml b/test/specs/issues/026.cpp.yaml index e51b1068..bc80ac8f 100644 --- a/test/specs/issues/026.cpp.yaml +++ b/test/specs/issues/026.cpp.yaml @@ -132,12 +132,16 @@ scopes: - punctuation.section.parameters.begin.bracket.round.function.pointer - source: int + scopesBegin: + - meta.parameter scopes: - storage.type.primitive - storage.type.built-in.primitive - source: a scopes: - variable.parameter + scopesEnd: + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round.function.pointer diff --git a/test/specs/issues/030.cpp.yaml b/test/specs/issues/030.cpp.yaml index 0d76fd91..c7b859a4 100644 --- a/test/specs/issues/030.cpp.yaml +++ b/test/specs/issues/030.cpp.yaml @@ -96,7 +96,9 @@ - punctuation.section.angle-brackets.end.template.call scopesEnd: - meta.template.call -- source: ' \' +- source: \ + scopes: + - constant.character.escape.line-continuation - source: '{' scopes: - punctuation.section.block.begin.bracket.curly.struct @@ -108,11 +110,11 @@ scopes: - constant.character.escape.line-continuation - source: static - scopes: - - storage.modifier.specifier.static + scopesBegin: + - storage.modifier.specifier.$5 - source: const - scopes: - - storage.modifier.specifier.const + scopesEnd: + - storage.modifier.specifier.$5 - source: bool scopes: - storage.type.primitive @@ -161,19 +163,15 @@ scopes: - constant.character.escape.line-continuation - source: IsPointDef - scopesBegin: - - meta.function scopes: - - entity.name.function + - entity.name.function.call - source: ( scopes: - - punctuation.section.arguments.begin.bracket.round + - punctuation.section.arguments.begin.bracket.round.function.call - source: T - source: ) scopes: - - punctuation.section.arguments.end.bracket.round - scopesEnd: - - meta.function + - punctuation.section.arguments.end.bracket.round.function.call - source: ; scopes: - punctuation.terminator.statement @@ -225,7 +223,9 @@ - source: 'std::true_type' scopes: - entity.name.type.inherited -- source: ' \' +- source: \ + scopes: + - constant.character.escape.line-continuation - source: '{' scopes: - punctuation.section.block.begin.bracket.curly.struct @@ -264,19 +264,15 @@ scopes: - constant.character.escape.line-continuation - source: IsPointDef - scopesBegin: - - meta.function scopes: - - entity.name.function + - entity.name.function.call - source: ( scopes: - - punctuation.section.arguments.begin.bracket.round + - punctuation.section.arguments.begin.bracket.round.function.call - source: T - source: ) scopes: - - punctuation.section.arguments.end.bracket.round - scopesEnd: - - meta.function + - punctuation.section.arguments.end.bracket.round.function.call - source: ; scopes: - punctuation.terminator.statement @@ -328,7 +324,9 @@ - source: 'std::true_type' scopes: - entity.name.type.inherited -- source: ' \' +- source: \ + scopes: + - constant.character.escape.line-continuation - source: '{' scopes: - punctuation.section.block.begin.bracket.curly.struct @@ -569,11 +567,10 @@ - source: static scopesBegin: - meta.body.struct - scopes: - - storage.modifier.specifier.static + - storage.modifier.specifier.$5 - source: const - scopes: - - storage.modifier.specifier.const + scopesEnd: + - storage.modifier.specifier.$5 - source: bool scopes: - storage.type.primitive @@ -634,11 +631,10 @@ - source: static scopesBegin: - meta.body.struct - scopes: - - storage.modifier.specifier.static + - storage.modifier.specifier.$5 - source: const - scopes: - - storage.modifier.specifier.const + scopesEnd: + - storage.modifier.specifier.$5 - source: bool scopes: - storage.type.primitive @@ -699,11 +695,10 @@ - source: static scopesBegin: - meta.body.struct - scopes: - - storage.modifier.specifier.static + - storage.modifier.specifier.$5 - source: const - scopes: - - storage.modifier.specifier.const + scopesEnd: + - storage.modifier.specifier.$5 - source: bool scopes: - storage.type.primitive diff --git a/test/specs/issues/032.cpp.yaml b/test/specs/issues/032.cpp.yaml index 9fa7d3af..47b13c40 100644 --- a/test/specs/issues/032.cpp.yaml +++ b/test/specs/issues/032.cpp.yaml @@ -2,7 +2,7 @@ scopesBegin: - source scopes: - - storage.modifier.specifier.const + - storage.modifier.specifier.$5 - source: char scopes: - storage.type.primitive diff --git a/test/specs/issues/034.cpp.yaml b/test/specs/issues/034.cpp.yaml index 8cb9fec4..e0687498 100644 --- a/test/specs/issues/034.cpp.yaml +++ b/test/specs/issues/034.cpp.yaml @@ -38,15 +38,14 @@ - comment.block - source: ( scopesBegin: - - meta.parens - scopes: - - punctuation.section.parens.begin.bracket.round + - meta.type.cast - source: addr -- source: ) scopes: - - punctuation.section.parens.end.bracket.round + - meta.qualified_type + - entity.name.type +- source: ) scopesEnd: - - meta.parens + - meta.type.cast - source: < scopes: - keyword.operator.comparison diff --git a/test/specs/issues/035.cpp.yaml b/test/specs/issues/035.cpp.yaml index 13206061..0bddd031 100644 --- a/test/specs/issues/035.cpp.yaml +++ b/test/specs/issues/035.cpp.yaml @@ -111,10 +111,16 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round.operator-overload -- source: 'U ' +- source: U + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter - source: k scopes: - variable.parameter + scopesEnd: + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round.operator-overload @@ -179,7 +185,6 @@ - source: delete scopes: - keyword.operator.wordlike - - memory - keyword.operator.delete - source: ; scopes: diff --git a/test/specs/issues/047.cpp.yaml b/test/specs/issues/047.cpp.yaml index fe82b8c4..de7ddb2a 100644 --- a/test/specs/issues/047.cpp.yaml +++ b/test/specs/issues/047.cpp.yaml @@ -1,21 +1,17 @@ - source: enum scopesBegin: - source - - meta.block.enum - - meta.head.enum scopes: - - storage.type.enum + - storage.type.enum.declare - source: bar scopes: - entity.name.type.enum - source: b - scopesEnd: - - meta.head.enum + scopes: + - variable.other.object.declare - source: ; scopes: - punctuation.terminator.statement - scopesEnd: - - meta.block.enum - source: int scopesBegin: - meta.function.definition @@ -42,21 +38,17 @@ - source: enum scopesBegin: - meta.body.function.definition - - meta.block.enum - - meta.head.enum scopes: - - storage.type.enum + - storage.type.enum.declare - source: bar scopes: - entity.name.type.enum - source: b - scopesEnd: - - meta.head.enum + scopes: + - variable.other.object.declare - source: ; scopes: - punctuation.terminator.statement - scopesEnd: - - meta.block.enum - source: '}' scopes: - punctuation.section.block.end.bracket.curly.function.definition diff --git a/test/specs/issues/050.cpp.yaml b/test/specs/issues/050.cpp.yaml index 4c917228..89e04bd9 100644 --- a/test/specs/issues/050.cpp.yaml +++ b/test/specs/issues/050.cpp.yaml @@ -1,6 +1,30 @@ -- source: switch +- source: int scopesBegin: - source + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: main + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: switch + scopesBegin: + - meta.body.function.definition - meta.block.switch - meta.head.switch scopes: @@ -107,26 +131,18 @@ - meta.block.switch - meta.body.switch - source: void - scopesBegin: - - meta.function.definition scopes: - - meta.qualified_type - storage.type.primitive - storage.type.built-in.primitive - source: func1 - scopesBegin: - - meta.head.function.definition scopes: - - entity.name.function.definition + - entity.name.function.call - source: ( scopes: - - punctuation.section.parameters.begin.bracket.round + - punctuation.section.arguments.begin.bracket.round.function.call - source: ) scopes: - - punctuation.section.parameters.end.bracket.round - scopesEnd: - - meta.function.definition - - meta.head.function.definition + - punctuation.section.arguments.end.bracket.round.function.call - source: ; scopes: - punctuation.terminator.statement @@ -144,23 +160,17 @@ scopesEnd: - support.other.attribute - source: void - scopesBegin: - - meta.function.definition scopes: - - meta.qualified_type - storage.type.primitive - storage.type.built-in.primitive - source: func2 - scopesBegin: - - meta.head.function.definition scopes: - - entity.name.function.definition + - entity.name.function.call - source: ( scopes: - - punctuation.section.parameters.begin.bracket.round + - punctuation.section.arguments.begin.bracket.round.function.call - source: /* scopesBegin: - - meta.function.definition.parameters - comment.block scopes: - punctuation.definition.comment.begin @@ -169,14 +179,10 @@ scopes: - punctuation.definition.comment.end scopesEnd: - - meta.function.definition.parameters - comment.block - source: ) scopes: - - punctuation.section.parameters.end.bracket.round - scopesEnd: - - meta.function.definition - - meta.head.function.definition + - punctuation.section.arguments.end.bracket.round.function.call - source: ; scopes: - punctuation.terminator.statement @@ -222,26 +228,21 @@ scopesEnd: - meta.block.struct - source: void - scopesBegin: - - meta.function.definition scopes: - - meta.qualified_type - storage.type.primitive - storage.type.built-in.primitive - source: func3 - scopesBegin: - - meta.head.function.definition scopes: - - entity.name.function.definition + - entity.name.function.call - source: ( scopes: - - punctuation.section.parameters.begin.bracket.round + - punctuation.section.arguments.begin.bracket.round.function.call - source: ) scopes: - - punctuation.section.parameters.end.bracket.round - scopesEnd: - - meta.function.definition - - meta.head.function.definition + - punctuation.section.arguments.end.bracket.round.function.call - source: ; scopes: - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition diff --git a/test/specs/issues/055.cpp.yaml b/test/specs/issues/055.cpp.yaml index b0c656f1..d771ebe3 100644 --- a/test/specs/issues/055.cpp.yaml +++ b/test/specs/issues/055.cpp.yaml @@ -54,26 +54,32 @@ - source: enum scopesBegin: - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter - source: foo scopes: - - entity.name.scope-resolution + - entity.name.scope-resolution.parameter - source: '::' scopes: - punctuation.separator.namespace.access - - punctuation.separator.scope-resolution + - punctuation.separator.scope-resolution.parameter - source: bar scopes: - - entity.name.scope-resolution + - entity.name.scope-resolution.parameter - source: '::' scopes: - punctuation.separator.namespace.access - - punctuation.separator.scope-resolution -- source: 'baz ' + - punctuation.separator.scope-resolution.parameter +- source: baz + scopes: + - entity.name.type.parameter - source: quix scopes: - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round diff --git a/test/specs/issues/059.cpp.yaml b/test/specs/issues/059.cpp.yaml index 5deace20..6e95a98f 100644 --- a/test/specs/issues/059.cpp.yaml +++ b/test/specs/issues/059.cpp.yaml @@ -110,6 +110,7 @@ - source: this scopes: - meta.lambda.capture + - variable.language.this - source: ']' scopes: - punctuation.definition.capture.end.lambda diff --git a/test/specs/issues/064.cpp.yaml b/test/specs/issues/064.cpp.yaml index 0b0867e1..6805c8c0 100644 --- a/test/specs/issues/064.cpp.yaml +++ b/test/specs/issues/064.cpp.yaml @@ -39,7 +39,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: int scopes: @@ -62,7 +61,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: int scopes: @@ -86,7 +84,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: '[] ' - source: int @@ -110,7 +107,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: '[] ' - source: int @@ -131,20 +127,25 @@ - source: = scopes: - keyword.operator.assignment -- source: '::' +- source: ' ::' - source: new scopes: - - entity.name.function.call + - keyword.operator.wordlike + - keyword.operator.new - source: ( + scopesBegin: + - meta.parens scopes: - - punctuation.section.arguments.begin.bracket.round.function.call + - punctuation.section.parens.begin.bracket.round - source: int scopes: - storage.type.primitive - storage.type.built-in.primitive - source: ) scopes: - - punctuation.section.arguments.end.bracket.round.function.call + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens - source: ; scopes: - punctuation.terminator.statement @@ -162,7 +163,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: @@ -196,7 +196,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: '[] ' - source: ( @@ -230,7 +229,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: '[] ' - source: ( @@ -261,13 +259,16 @@ - source: = scopes: - keyword.operator.assignment -- source: '::' +- source: ' ::' - source: new scopes: - - entity.name.function.call + - keyword.operator.wordlike + - keyword.operator.new - source: ( + scopesBegin: + - meta.parens scopes: - - punctuation.section.arguments.begin.bracket.round.function.call + - punctuation.section.parens.begin.bracket.round - source: '2' scopes: - constant.numeric.decimal @@ -278,7 +279,9 @@ - source: ' f' - source: ) scopes: - - punctuation.section.arguments.end.bracket.round.function.call + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens - source: int scopes: - storage.type.primitive @@ -300,7 +303,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: @@ -338,13 +340,16 @@ - source: = scopes: - keyword.operator.assignment -- source: '::' +- source: ' ::' - source: new scopes: - - entity.name.function.call + - keyword.operator.wordlike + - keyword.operator.new - source: ( + scopesBegin: + - meta.parens scopes: - - punctuation.section.arguments.begin.bracket.round.function.call + - punctuation.section.parens.begin.bracket.round - source: '2' scopes: - constant.numeric.decimal @@ -355,7 +360,9 @@ - source: ' f' - source: ) scopes: - - punctuation.section.arguments.end.bracket.round.function.call + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens - source: '[] ' - source: int scopes: @@ -378,7 +385,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: @@ -417,13 +423,16 @@ - source: = scopes: - keyword.operator.assignment -- source: '::' +- source: ' ::' - source: new scopes: - - entity.name.function.call + - keyword.operator.wordlike + - keyword.operator.new - source: ( + scopesBegin: + - meta.parens scopes: - - punctuation.section.arguments.begin.bracket.round.function.call + - punctuation.section.parens.begin.bracket.round - source: '2' scopes: - constant.numeric.decimal @@ -434,10 +443,8 @@ - source: ' f' - source: ) scopes: - - punctuation.section.arguments.end.bracket.round.function.call + - punctuation.section.parens.end.bracket.round - source: ( - scopesBegin: - - meta.parens scopes: - punctuation.section.parens.begin.bracket.round - source: int @@ -466,7 +473,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: @@ -510,13 +516,16 @@ - source: = scopes: - keyword.operator.assignment -- source: '::' +- source: ' ::' - source: new scopes: - - entity.name.function.call + - keyword.operator.wordlike + - keyword.operator.new - source: ( + scopesBegin: + - meta.parens scopes: - - punctuation.section.arguments.begin.bracket.round.function.call + - punctuation.section.parens.begin.bracket.round - source: '2' scopes: - constant.numeric.decimal @@ -527,7 +536,9 @@ - source: ' f' - source: ) scopes: - - punctuation.section.arguments.end.bracket.round.function.call + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens - source: '[] ' - source: ( scopesBegin: @@ -560,7 +571,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: @@ -602,7 +612,6 @@ - source: delete scopes: - keyword.operator.wordlike - - memory - keyword.operator.delete - source: ' a' - source: ; @@ -611,7 +620,6 @@ - source: delete scopes: - keyword.operator.wordlike - - memory - keyword.operator.delete - source: ' a' - source: ; @@ -621,7 +629,6 @@ - source: delete scopesBegin: - keyword.operator.wordlike - - memory scopes: - keyword.operator.delete.array - source: '[]' @@ -629,7 +636,6 @@ - keyword.operator.delete.array.bracket scopesEnd: - keyword.operator.wordlike - - memory - source: ' a' - source: ; scopes: @@ -637,7 +643,6 @@ - source: delete scopesBegin: - keyword.operator.wordlike - - memory scopes: - keyword.operator.delete.array - source: '[]' @@ -645,29 +650,32 @@ - keyword.operator.delete.array.bracket scopesEnd: - keyword.operator.wordlike - - memory - source: ' a' - source: ; scopes: - punctuation.terminator.statement -- source: '::' +- source: ' ::' - source: delete scopes: - - entity.name.function.call + - keyword.operator.wordlike + - keyword.operator.delete - source: ( + scopesBegin: + - meta.parens scopes: - - punctuation.section.arguments.begin.bracket.round.function.call + - punctuation.section.parens.begin.bracket.round - source: a - source: ) scopes: - - punctuation.section.arguments.end.bracket.round.function.call + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens - source: ; scopes: - punctuation.terminator.statement - source: delete scopes: - keyword.operator.wordlike - - memory - keyword.operator.delete - source: ( scopesBegin: @@ -687,7 +695,6 @@ - source: delete scopesBegin: - keyword.operator.wordlike - - memory scopes: - keyword.operator.delete.array - source: '[]' @@ -695,7 +702,6 @@ - keyword.operator.delete.array.bracket scopesEnd: - keyword.operator.wordlike - - memory - source: ( scopesBegin: - meta.parens @@ -713,7 +719,6 @@ - source: delete scopesBegin: - keyword.operator.wordlike - - memory scopes: - keyword.operator.delete.array - source: '[]' @@ -721,7 +726,6 @@ - keyword.operator.delete.array.bracket scopesEnd: - keyword.operator.wordlike - - memory - source: ( scopesBegin: - meta.parens @@ -736,13 +740,16 @@ - source: ; scopes: - punctuation.terminator.statement -- source: '::' +- source: ' ::' - source: delete scopes: - - entity.name.function.call + - keyword.operator.wordlike + - keyword.operator.delete - source: ( + scopesBegin: + - meta.parens scopes: - - punctuation.section.arguments.begin.bracket.round.function.call + - punctuation.section.parens.begin.bracket.round - source: a - source: ',' scopes: @@ -751,14 +758,15 @@ - source: ' b' - source: ) scopes: - - punctuation.section.arguments.end.bracket.round.function.call + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens - source: ; scopes: - punctuation.terminator.statement - source: delete scopes: - keyword.operator.wordlike - - memory - keyword.operator.delete - source: ( scopesBegin: @@ -783,7 +791,6 @@ - source: delete scopesBegin: - keyword.operator.wordlike - - memory scopes: - keyword.operator.delete.array - source: '[]' @@ -791,7 +798,6 @@ - keyword.operator.delete.array.bracket scopesEnd: - keyword.operator.wordlike - - memory - source: ( scopesBegin: - meta.parens @@ -814,7 +820,6 @@ - source: delete scopesBegin: - keyword.operator.wordlike - - memory scopes: - keyword.operator.delete.array - source: '[]' @@ -822,7 +827,6 @@ - keyword.operator.delete.array.bracket scopesEnd: - keyword.operator.wordlike - - memory - source: ( scopesBegin: - meta.parens diff --git a/test/specs/issues/071.cpp.yaml b/test/specs/issues/071.cpp.yaml index 4ead3b75..0689a60d 100644 --- a/test/specs/issues/071.cpp.yaml +++ b/test/specs/issues/071.cpp.yaml @@ -325,22 +325,26 @@ - source: int scopesBegin: - meta.function.definition.parameters + - meta.parameter scopes: - storage.type.primitive - storage.type.built-in.primitive - source: '*' scopes: - - keyword.operator + - storage.modifier.pointer - source: ',' scopes: - comma - punctuation.separator.delimiter -- source: ' usertype ' +- source: usertype + scopes: + - entity.name.type.parameter - source: user_value scopes: - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round diff --git a/test/specs/issues/076.cpp.yaml b/test/specs/issues/076.cpp.yaml index 9b2f2397..d1332988 100644 --- a/test/specs/issues/076.cpp.yaml +++ b/test/specs/issues/076.cpp.yaml @@ -21,6 +21,7 @@ - source: void scopes: - meta.function.definition.parameters + - meta.parameter - storage.type.primitive - storage.type.built-in.primitive - source: ) diff --git a/test/specs/issues/079.cpp.yaml b/test/specs/issues/079.cpp.yaml index b3a464ae..2feab037 100644 --- a/test/specs/issues/079.cpp.yaml +++ b/test/specs/issues/079.cpp.yaml @@ -86,7 +86,7 @@ - punctuation.terminator.statement - source: extern scopes: - - storage.modifier.specifier.extern + - storage.modifier.specifier.$5 - source: ' template ' - source: class scopesBegin: @@ -126,7 +126,7 @@ - meta.block.class - source: extern scopes: - - storage.modifier.specifier.extern + - storage.modifier.specifier.$5 - source: ' template' - source: MyStack scopes: diff --git a/test/specs/issues/082.cpp.yaml b/test/specs/issues/082.cpp.yaml index 2eadc596..abeecd58 100644 --- a/test/specs/issues/082.cpp.yaml +++ b/test/specs/issues/082.cpp.yaml @@ -84,7 +84,11 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round.operator-overload -- source: 'pointerT ' +- source: pointerT + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter - source: /* scopesBegin: - comment.block @@ -103,10 +107,12 @@ - source: const scopes: - storage.modifier.specifier.const -- source: ' hashT' +- source: hashT + scopes: + - entity.name.type.parameter - source: '&' scopes: - - keyword.operator + - storage.modifier.reference - source: /* scopesBegin: - comment.block @@ -122,7 +128,9 @@ scopes: - comma - punctuation.separator.delimiter -- source: ' pointerT ' +- source: pointerT + scopes: + - entity.name.type.parameter - source: /* scopesBegin: - comment.block @@ -171,6 +179,7 @@ scopes: - punctuation.definition.comment.end scopesEnd: + - meta.parameter - comment.block - source: ) scopes: @@ -426,7 +435,11 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round.operator-overload -- source: 'pointerT ' +- source: pointerT + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter - source: /* scopesBegin: - comment.block @@ -445,10 +458,12 @@ - source: const scopes: - storage.modifier.specifier.const -- source: ' hashT' +- source: hashT + scopes: + - entity.name.type.parameter - source: '&' scopes: - - keyword.operator + - storage.modifier.reference - source: /* scopesBegin: - comment.block @@ -464,7 +479,9 @@ scopes: - comma - punctuation.separator.delimiter -- source: ' pointerT ' +- source: pointerT + scopes: + - entity.name.type.parameter - source: /* scopesBegin: - comment.block @@ -513,6 +530,7 @@ scopes: - punctuation.definition.comment.end scopesEnd: + - meta.parameter - comment.block - source: ) scopes: diff --git a/test/specs/issues/083.cpp.yaml b/test/specs/issues/083.cpp.yaml index 275a0524..1fccbe34 100644 --- a/test/specs/issues/083.cpp.yaml +++ b/test/specs/issues/083.cpp.yaml @@ -34,13 +34,12 @@ - meta.body.function.definition scopes: - variable.language.this -- source: '-' +- source: '->' scopes: - - keyword.operator -- source: '>' + - punctuation.separator.pointer-access +- source: a scopes: - - keyword.operator.comparison -- source: 'a ' + - variable.other.property - source: = scopes: - keyword.operator.assignment diff --git a/test/specs/issues/106.cpp.yaml b/test/specs/issues/106.cpp.yaml index 9662d86b..916e6c76 100644 --- a/test/specs/issues/106.cpp.yaml +++ b/test/specs/issues/106.cpp.yaml @@ -75,10 +75,16 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round.operator-overload -- source: 'argument_type ' +- source: argument_type + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter - source: k scopes: - variable.parameter + scopesEnd: + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round.operator-overload diff --git a/test/specs/issues/121.cpp.yaml b/test/specs/issues/121.cpp.yaml index e140ad45..282cf7e1 100644 --- a/test/specs/issues/121.cpp.yaml +++ b/test/specs/issues/121.cpp.yaml @@ -62,9 +62,17 @@ scopes: - storage.type.class - source: DLLEXPORT + scopes: + - entity.name.other.preprocessor.macro.predefined.DLLEXPORT +- source: ChildClass scopes: - entity.name.type.class -- source: 'ChildClass : ' +- source: ':' + scopes: + - colon + - punctuation.separator.inheritance + scopesEnd: + - meta.head.class - source: public scopes: - storage.type.modifier.access.public @@ -73,9 +81,8 @@ - entity.name.type.inherited - source: '{' scopes: - - punctuation.section.block.begin.bracket.curly.class - scopesEnd: - meta.head.class + - punctuation.section.block.begin.bracket.curly.class - source: '}' scopes: - meta.body.class diff --git a/test/specs/issues/128.cpp.yaml b/test/specs/issues/128.cpp.yaml index a5d1d9ad..e7c10116 100644 --- a/test/specs/issues/128.cpp.yaml +++ b/test/specs/issues/128.cpp.yaml @@ -30,7 +30,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ' symbolTableEntry ' - source: '*' diff --git a/test/specs/issues/129.cpp.yaml b/test/specs/issues/129.cpp.yaml index a6e38eff..55184d35 100644 --- a/test/specs/issues/129.cpp.yaml +++ b/test/specs/issues/129.cpp.yaml @@ -27,7 +27,6 @@ - meta.body.function.definition scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ' Foo' - source: ; @@ -36,7 +35,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: @@ -55,19 +53,17 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: - - meta.parens - scopes: - - punctuation.section.parens.begin.bracket.round + - meta.type.cast - source: fooptr -- source: ) scopes: - - punctuation.section.parens.end.bracket.round + - meta.qualified_type + - entity.name.type +- source: ) scopesEnd: - - meta.parens + - meta.type.cast - source: ' Foo' - source: ; scopes: @@ -75,18 +71,20 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: - - meta.parens - scopes: - - punctuation.section.parens.begin.bracket.round + - meta.type.cast - source: fooptr -- source: ) scopes: - - punctuation.section.parens.end.bracket.round + - meta.qualified_type + - entity.name.type +- source: ) + scopesEnd: + - meta.type.cast - source: ( + scopesBegin: + - meta.parens scopes: - punctuation.section.parens.begin.bracket.round - source: Foo diff --git a/test/specs/issues/134.cpp.yaml b/test/specs/issues/134.cpp.yaml index 33c40866..2781c5c3 100644 --- a/test/specs/issues/134.cpp.yaml +++ b/test/specs/issues/134.cpp.yaml @@ -41,6 +41,8 @@ - source: Type scopes: - meta.function.definition.parameters + - meta.parameter + - entity.name.type.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -65,14 +67,18 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round -- source: 'Type ' +- source: Type scopesBegin: - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter - source: foo scopes: - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -116,6 +122,9 @@ scopes: - punctuation.section.parameters.begin.bracket.round.function.pointer - source: Type + scopes: + - meta.parameter + - entity.name.type.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round.function.pointer @@ -167,6 +176,9 @@ scopes: - punctuation.section.parameters.begin.bracket.round.function.pointer - source: Type + scopes: + - meta.parameter + - entity.name.type.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round.function.pointer @@ -196,17 +208,19 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round -- source: 'Type ' +- source: Type scopesBegin: - meta.function.definition.parameters + - meta.parameter scopes: - - variable.parameter.defaulted + - entity.name.type.parameter - source: = scopes: - - keyword.operator.assignment + - keyword.operator.assignment.default - source: ' value' scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -231,18 +245,22 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round -- source: 'Type ' +- source: Type scopesBegin: - meta.function.definition.parameters -- source: 'foo ' + - meta.parameter + scopes: + - entity.name.type.parameter +- source: foo scopes: - variable.parameter.defaulted - source: = scopes: - - keyword.operator.assignment + - keyword.operator.assignment.default - source: ' value' scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -286,13 +304,19 @@ scopes: - punctuation.section.parameters.begin.bracket.round.function.pointer - source: Type + scopes: + - meta.parameter + - entity.name.type.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round.function.pointer - source: = scopes: - keyword.operator.assignment -- source: ' value' +- source: value + scopes: + - meta.parameter + - entity.name.type.parameter scopesEnd: - meta.function.definition.parameters - source: ) @@ -341,13 +365,19 @@ scopes: - punctuation.section.parameters.begin.bracket.round.function.pointer - source: Type + scopes: + - meta.parameter + - entity.name.type.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round.function.pointer - source: = scopes: - keyword.operator.assignment -- source: ' value' +- source: value + scopes: + - meta.parameter + - entity.name.type.parameter scopesEnd: - meta.function.definition.parameters - source: ) diff --git a/test/specs/issues/136.cpp.yaml b/test/specs/issues/136.cpp.yaml index 231f9d33..9c576451 100644 --- a/test/specs/issues/136.cpp.yaml +++ b/test/specs/issues/136.cpp.yaml @@ -72,11 +72,19 @@ scopes: - punctuation.definition.parameters.begin.lambda - source: expected + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter - source: ',' scopes: - comma - punctuation.separator.delimiter -- source: ' actual' +- source: actual + scopes: + - entity.name.type.parameter + scopesEnd: + - meta.parameter - source: ) scopes: - punctuation.definition.parameters.end.lambda diff --git a/test/specs/issues/158.cpp.yaml b/test/specs/issues/158.cpp.yaml index fa547b7b..b0a1d27b 100644 --- a/test/specs/issues/158.cpp.yaml +++ b/test/specs/issues/158.cpp.yaml @@ -51,13 +51,16 @@ - source: const scopesBegin: - meta.function.definition.parameters + - meta.parameter scopes: - storage.modifier.specifier.const -- source: ' string' +- source: string + scopes: + - entity.name.type.parameter - source: '&' scopes: - - keyword.operator -- source: ' what' + - storage.modifier.reference +- source: what scopes: - variable.parameter - source: ',' @@ -68,17 +71,18 @@ scopes: - storage.type.primitive - storage.type.built-in.primitive -- source: 'throwExcp ' +- source: throwExcp scopes: - variable.parameter.defaulted - source: = scopes: - - keyword.operator.assignment + - keyword.operator.assignment.default - source: 'false' scopes: - constant.language.false scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round diff --git a/test/specs/issues/186.cpp.yaml b/test/specs/issues/186.cpp.yaml index 67dbab57..c0103ab9 100644 --- a/test/specs/issues/186.cpp.yaml +++ b/test/specs/issues/186.cpp.yaml @@ -40,7 +40,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: std scopes: diff --git a/test/specs/issues/218.cpp.yaml b/test/specs/issues/218.cpp.yaml index 1787aeb3..6fc620b0 100644 --- a/test/specs/issues/218.cpp.yaml +++ b/test/specs/issues/218.cpp.yaml @@ -2,7 +2,7 @@ scopesBegin: - source scopes: - - storage.modifier.specifier.static + - storage.modifier.specifier.$5 - source: void scopesBegin: - meta.function.definition @@ -18,17 +18,22 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round -- source: ' a ' +- source: a scopesBegin: - meta.function.definition.parameters -- source: ' a' + - meta.parameter + scopes: + - entity.name.type.parameter +- source: a scopes: - variable.parameter - source: ',' scopes: - comma - punctuation.separator.delimiter -- source: ' a ' +- source: a + scopes: + - entity.name.type.parameter - source: a scopes: - variable.parameter @@ -36,7 +41,9 @@ scopes: - comma - punctuation.separator.delimiter -- source: ' a ' +- source: a + scopes: + - entity.name.type.parameter - source: a scopes: - variable.parameter @@ -44,7 +51,9 @@ scopes: - comma - punctuation.separator.delimiter -- source: ' a ' +- source: a + scopes: + - entity.name.type.parameter - source: a scopes: - variable.parameter @@ -52,7 +61,9 @@ scopes: - comma - punctuation.separator.delimiter -- source: ' a ' +- source: a + scopes: + - entity.name.type.parameter - source: a scopes: - variable.parameter @@ -64,7 +75,7 @@ scopes: - storage.type.primitive - storage.type.built-in.primitive -- source: ' a' +- source: a scopes: - variable.parameter - source: ',' @@ -75,7 +86,7 @@ scopes: - storage.type.primitive - storage.type.built-in.primitive -- source: ' a' +- source: a scopes: - variable.parameter - source: ',' @@ -86,7 +97,7 @@ scopes: - storage.type.primitive - storage.type.built-in.primitive -- source: ' a' +- source: a scopes: - variable.parameter - source: ',' @@ -97,11 +108,12 @@ scopes: - storage.type.primitive - storage.type.built-in.primitive -- source: ' a' +- source: a scopes: - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -203,7 +215,12 @@ scopes: - storage.type.primitive - storage.type.built-in.primitive -- source: ' a : a' +- source: ' a ' +- source: ':' + scopes: + - colon + - punctuation.separator.range-based +- source: ' a' - source: ) scopes: - punctuation.section.parens.end.bracket.round @@ -262,7 +279,7 @@ - keyword.control.if - source: ( scopesBegin: - - meta.parens.block + - meta.parens scopes: - punctuation.section.parens.begin.bracket.round - source: 'a ' @@ -274,8 +291,10 @@ scopes: - punctuation.section.parens.end.bracket.round scopesEnd: - - meta.parens.block + - meta.parens - source: '{' + scopesBegin: + - meta.block scopes: - punctuation.section.block.begin.bracket.curly - source: switch @@ -514,6 +533,8 @@ - source: '}' scopes: - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block - source: a scopes: - entity.name.function.call @@ -580,7 +601,7 @@ - meta.body.function.definition - source: static scopes: - - storage.modifier.specifier.static + - storage.modifier.specifier.$5 - source: void scopesBegin: - meta.function.definition @@ -596,25 +617,32 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round -- source: ' a ' +- source: a scopesBegin: - meta.function.definition.parameters -- source: ' a' + - meta.parameter + scopes: + - entity.name.type.parameter +- source: a scopes: - variable.parameter - source: ',' scopes: - comma - punctuation.separator.delimiter -- source: ' a ' -- source: ' a' +- source: a + scopes: + - entity.name.type.parameter +- source: a scopes: - variable.parameter - source: ',' scopes: - comma - punctuation.separator.delimiter -- source: ' a ' +- source: a + scopes: + - entity.name.type.parameter - source: a scopes: - variable.parameter @@ -622,12 +650,15 @@ scopes: - comma - punctuation.separator.delimiter -- source: ' a ' -- source: ' a' +- source: a + scopes: + - entity.name.type.parameter +- source: a scopes: - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -814,7 +845,12 @@ scopes: - storage.type.primitive - storage.type.built-in.primitive -- source: ' a: a' +- source: ' a' +- source: ':' + scopes: + - colon + - punctuation.separator.range-based +- source: ' a' - source: ) scopes: - punctuation.section.parens.end.bracket.round diff --git a/test/specs/issues/224.cpp.yaml b/test/specs/issues/224.cpp.yaml index 07b9d374..e6cce244 100644 --- a/test/specs/issues/224.cpp.yaml +++ b/test/specs/issues/224.cpp.yaml @@ -1,6 +1,30 @@ -- source: for +- source: int scopesBegin: - source + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: main + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: for + scopesBegin: + - meta.body.function.definition scopes: - keyword.control.for - source: ( @@ -10,7 +34,7 @@ - punctuation.section.parens.begin.bracket.round - source: const scopes: - - storage.modifier.specifier.const + - storage.modifier.specifier.$5 - source: auto scopes: - storage.type.primitive @@ -34,7 +58,11 @@ - punctuation.definition.end.bracket.square scopesEnd: - meta.bracket.square.access -- source: ' : c' +- source: ':' + scopes: + - colon + - punctuation.separator.range-based +- source: ' c' - source: ) scopes: - punctuation.section.parens.end.bracket.round @@ -77,7 +105,7 @@ - punctuation.section.parens.begin.bracket.round - source: const scopes: - - storage.modifier.specifier.const + - storage.modifier.specifier.$5 - source: auto scopes: - storage.type.primitive @@ -98,7 +126,11 @@ - punctuation.definition.end.bracket.square scopesEnd: - meta.bracket.square.access -- source: ' : c' +- source: ':' + scopes: + - colon + - punctuation.separator.range-based +- source: ' c' - source: ) scopes: - punctuation.section.parens.end.bracket.round @@ -129,3 +161,8 @@ scopes: - punctuation.definition.comment - source: ' bug' + scopesEnd: + - comment.line.double-slash +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition diff --git a/test/specs/issues/230.cpp.yaml b/test/specs/issues/230.cpp.yaml new file mode 100644 index 00000000..7e9279c6 --- /dev/null +++ b/test/specs/issues/230.cpp.yaml @@ -0,0 +1,245 @@ +- source: void + scopesBegin: + - source + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: func + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: class + scopesBegin: + - meta.body.function.definition + scopes: + - storage.type.class.declare +- source: var + scopes: + - entity.name.type.class +- source: '**' + scopes: + - storage.modifier.pointer +- source: thing + scopes: + - variable.other.object.declare +- source: = + scopes: + - keyword.operator.assignment +- source: ' (' + scopesBegin: + - meta.type.cast +- source: class + scopesBegin: + - meta.qualified_type + scopes: + - storage.type.class +- source: var + scopes: + - entity.name.type + scopesEnd: + - meta.qualified_type +- source: '**' + scopes: + - storage.modifier.pointer +- source: ) + scopesEnd: + - meta.type.cast +- source: func + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: comment + scopesEnd: + - comment.line.double-slash +- source: struct + scopes: + - storage.type.struct.declare +- source: var + scopes: + - entity.name.type.struct +- source: '**' + scopes: + - storage.modifier.pointer +- source: thing + scopes: + - variable.other.object.declare +- source: = + scopes: + - keyword.operator.assignment +- source: ' (' + scopesBegin: + - meta.type.cast +- source: struct + scopesBegin: + - meta.qualified_type + scopes: + - storage.type.struct +- source: var + scopes: + - entity.name.type + scopesEnd: + - meta.qualified_type +- source: '**' + scopes: + - storage.modifier.pointer +- source: ) + scopesEnd: + - meta.type.cast +- source: func + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: comment + scopesEnd: + - comment.line.double-slash +- source: enum + scopes: + - storage.type.enum.declare +- source: var + scopes: + - entity.name.type.enum +- source: '**' + scopes: + - storage.modifier.pointer +- source: thing + scopes: + - variable.other.object.declare +- source: = + scopes: + - keyword.operator.assignment +- source: ' (' + scopesBegin: + - meta.type.cast +- source: enum + scopesBegin: + - meta.qualified_type + scopes: + - storage.type.enum +- source: var + scopes: + - entity.name.type + scopesEnd: + - meta.qualified_type +- source: '**' + scopes: + - storage.modifier.pointer +- source: ) + scopesEnd: + - meta.type.cast +- source: func + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: comment + scopesEnd: + - comment.line.double-slash +- source: union + scopes: + - storage.type.union.declare +- source: var + scopes: + - entity.name.type.union +- source: '**' + scopes: + - storage.modifier.pointer +- source: thing + scopes: + - variable.other.object.declare +- source: = + scopes: + - keyword.operator.assignment +- source: ' (' + scopesBegin: + - meta.type.cast +- source: union + scopesBegin: + - meta.qualified_type + scopes: + - storage.type.union +- source: var + scopes: + - entity.name.type + scopesEnd: + - meta.qualified_type +- source: '**' + scopes: + - storage.modifier.pointer +- source: ) + scopesEnd: + - meta.type.cast +- source: func + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: comment + scopesEnd: + - comment.line.double-slash +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition diff --git a/test/specs/issues/238.cpp.yaml b/test/specs/issues/238.cpp.yaml new file mode 100644 index 00000000..f3f09bb8 --- /dev/null +++ b/test/specs/issues/238.cpp.yaml @@ -0,0 +1,90 @@ +- source: '#' + scopesBegin: + - source + - meta.preprocessor.macro + - keyword.control.directive.define + scopes: + - punctuation.definition.directive +- source: define + scopesEnd: + - keyword.control.directive.define +- source: G_STATIC_ASSERT_EXPR + scopes: + - entity.name.function.preprocessor +- source: ( + scopes: + - punctuation.definition.parameters.begin +- source: expr + scopes: + - variable.parameter.preprocessor +- source: ) + scopes: + - punctuation.definition.parameters.end +- source: ( + scopesBegin: + - punctuation.section.parens.begin.bracket.round +- source: ( + scopesEnd: + - punctuation.section.parens.begin.bracket.round +- source: void + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round +- source: sizeof + scopes: + - keyword.operator.functionlike + - keyword.operator.sizeof +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.operator.sizeof +- source: char + scopesBegin: + - meta.arguments.operator.sizeof + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: ( + scopesBegin: + - meta.type.cast +- source: expr + scopes: + - meta.qualified_type + - entity.name.type +- source: ) + scopesEnd: + - meta.type.cast +- source: '?' + scopes: + - keyword.operator.ternary +- source: '1' + scopes: + - constant.numeric.decimal +- source: ':' + scopes: + - keyword.operator.ternary +- source: '-' + scopes: + - keyword.operator +- source: '1' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.arguments.operator.sizeof + - meta.bracket.square.access +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.operator.sizeof +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round diff --git a/test/specs/vscode/example.cpp.yaml b/test/specs/vscode/example.cpp.yaml new file mode 100644 index 00000000..e29048b6 --- /dev/null +++ b/test/specs/vscode/example.cpp.yaml @@ -0,0 +1,9993 @@ +- source: '#' + scopesBegin: + - source + - meta.preprocessor.include + - keyword.control.directive.include + scopes: + - punctuation.definition.directive +- source: include + scopesEnd: + - keyword.control.directive.include +- source: < + scopesBegin: + - string.quoted.other.lt-gt.include + scopes: + - punctuation.definition.string.begin +- source: iostream +- source: '>' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.other.lt-gt.include +- source: '#' + scopesBegin: + - keyword.control.directive.include + scopes: + - punctuation.definition.directive +- source: include + scopesEnd: + - keyword.control.directive.include +- source: < + scopesBegin: + - string.quoted.other.lt-gt.include + scopes: + - punctuation.definition.string.begin +- source: sstream +- source: '>' + scopes: + - punctuation.definition.string.end + scopesEnd: + - meta.preprocessor.include + - string.quoted.other.lt-gt.include +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Constants' +- source: // + scopesBegin: + - punctuation.definition.comment +- source: // +- source: // +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Digits' +- source: // + scopesBegin: + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' decimal' + scopesEnd: + - comment.line.double-slash +- source: '1' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '1' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '239480' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '239480' + scopes: + - constant.numeric.decimal +- source: f + scopes: + - keyword.other.unit.suffix.floating-point +- source: '0' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '0' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: f + scopes: + - keyword.other.unit.suffix.floating-point +- source: '0' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: L + scopes: + - keyword.other.unit.suffix.floating-point +- source: '0' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: LL + scopes: + - keyword.other.unit.user-defined +- source: '4897430' + scopes: + - constant.numeric.decimal +- source: la + scopes: + - keyword.other.unit.user-defined +- source: '32094' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '930123' + scopes: + - constant.numeric.decimal +- source: a + scopes: + - keyword.other.unit.user-defined +- source: '4897430' + scopes: + - constant.numeric.decimal +- source: LL + scopes: + - keyword.other.unit.suffix.integer +- source: '32094' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '930123' + scopes: + - constant.numeric.decimal +- source: F + scopes: + - keyword.other.unit.suffix.floating-point +- source: '32094' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '930123' + scopes: + - constant.numeric.decimal +- source: f + scopes: + - keyword.other.unit.suffix.floating-point +- source: '1' + scopesBegin: + - constant.numeric.decimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '03' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '432' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '43' +- source: '123232' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '1231321' +- source: '3' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '20' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '94' + scopesEnd: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '93' + scopesBegin: + - constant.numeric.decimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '01' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '23' +- source: '3' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '20' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '94' + scopesEnd: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '93' + scopesBegin: + - constant.numeric.decimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '1' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '23' + scopesEnd: + - constant.numeric.decimal +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' e' + scopesEnd: + - comment.line.double-slash +- source: '0' + scopes: + - constant.numeric.decimal +- source: e + scopes: + - keyword.other.unit.exponent.decimal +- source: '1' + scopes: + - constant.numeric.exponent.decimal +- source: '1' + scopes: + - constant.numeric.decimal +- source: e + scopes: + - keyword.other.unit.exponent.decimal +- source: '10' + scopes: + - constant.numeric.exponent.decimal +- source: f + scopes: + - keyword.other.unit.suffix.integer +- source: '1' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: e + scopes: + - keyword.other.unit.exponent.decimal +- source: '10' + scopes: + - constant.numeric.exponent.decimal +- source: '1' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: e + scopes: + - keyword.other.unit.exponent.decimal +- source: '10' + scopes: + - constant.numeric.exponent.decimal +- source: '1' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: e + scopes: + - keyword.other.unit.exponent.decimal +- source: '-' + scopes: + - keyword.operator.minus.exponent.decimal +- source: '10' + scopes: + - constant.numeric.exponent.decimal +- source: '1' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '79769' + scopes: + - constant.numeric.decimal +- source: e + scopes: + - keyword.other.unit.exponent.decimal +- source: + + scopes: + - keyword.operator.plus.exponent.decimal +- source: '308' + scopes: + - constant.numeric.exponent.decimal +- source: '1' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '79' + scopesBegin: + - constant.numeric.decimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '76' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '9' + scopesEnd: + - constant.numeric.decimal +- source: e + scopes: + - keyword.other.unit.exponent.decimal +- source: + + scopes: + - keyword.operator.plus.exponent.decimal +- source: '3' + scopesBegin: + - constant.numeric.exponent.decimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '0' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '8' + scopesEnd: + - constant.numeric.exponent.decimal +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' octal' + scopesEnd: + - comment.line.double-slash +- source: '0' + scopes: + - keyword.other.unit.octal +- source: '1' + scopes: + - constant.numeric.octal +- source: '0' + scopes: + - keyword.other.unit.octal +- source: '1001202' + scopes: + - constant.numeric.octal +- source: '0' + scopes: + - keyword.other.unit.octal +- source: '10' + scopesBegin: + - constant.numeric.octal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '0' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '120' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '2' + scopesEnd: + - constant.numeric.octal +- source: '0' + scopes: + - keyword.other.unit.octal +- source: '''' + scopesBegin: + - constant.numeric.octal + scopes: + - punctuation.separator.constant.numeric +- source: '1' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '2' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '3' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '4' + scopesEnd: + - constant.numeric.octal +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' binary' + scopesEnd: + - comment.line.double-slash +- source: 0b + scopes: + - keyword.other.unit.binary +- source: '101010' + scopes: + - constant.numeric.binary +- source: 0b + scopes: + - keyword.other.unit.binary +- source: '000001' + scopes: + - constant.numeric.binary +- source: 0b + scopes: + - keyword.other.unit.binary +- source: '100001' + scopes: + - constant.numeric.binary +- source: 0b + scopes: + - keyword.other.unit.binary +- source: '1' + scopesBegin: + - constant.numeric.binary +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '01' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '010' + scopesEnd: + - constant.numeric.binary +- source: 0b + scopes: + - keyword.other.unit.binary +- source: '1' + scopesBegin: + - constant.numeric.binary +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '00' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '001' + scopesEnd: + - constant.numeric.binary +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' hex' + scopesEnd: + - comment.line.double-slash +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '01' + scopes: + - constant.numeric.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: abcdef + scopes: + - constant.numeric.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: aBCDEf + scopes: + - constant.numeric.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: ABCDEF + scopes: + - constant.numeric.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: AB + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: cd + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '5' + scopes: + - constant.numeric.exponent.hexadecimal +- source: f + scopes: + - keyword.other.unit.suffix.floating-point +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: AB + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: cd + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '5' + scopes: + - constant.numeric.exponent.hexadecimal +- source: l + scopes: + - keyword.other.unit.suffix.floating-point +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 20394af + scopes: + - constant.numeric.hexadecimal +- source: LL + scopes: + - keyword.other.unit.suffix.integer +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '01' + scopes: + - constant.numeric.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: abc + scopesBegin: + - constant.numeric.hexadecimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: def + scopesEnd: + - constant.numeric.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: a + scopesBegin: + - constant.numeric.hexadecimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: BC +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: DEf + scopesEnd: + - constant.numeric.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: ABC + scopesBegin: + - constant.numeric.hexadecimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: DEF + scopesEnd: + - constant.numeric.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '20' + scopesBegin: + - constant.numeric.hexadecimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '394' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: a +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: f + scopesEnd: + - constant.numeric.hexadecimal +- source: LL + scopes: + - keyword.other.unit.suffix.integer +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' hex floating point literal' + scopesEnd: + - comment.line.double-slash +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '0' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '5' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: F + scopes: + - keyword.other.unit.suffix.floating-point +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '0' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '5' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: f + scopes: + - keyword.other.unit.suffix.floating-point +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 1ff + scopes: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '0' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '23' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '0' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '234985' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: L + scopes: + - keyword.other.unit.suffix.floating-point +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '139804' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '234985' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: L + scopes: + - keyword.other.unit.suffix.floating-point +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '0' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '53' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '84' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '92' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '5' + scopesBegin: + - constant.numeric.hexadecimal +- source: . + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '0' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '23' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: + + scopes: + - keyword.operator.plus.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '0' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '234985' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: + + scopes: + - keyword.operator.plus.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: L + scopes: + - keyword.other.unit.suffix.floating-point +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '139804' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '234985' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '-' + scopes: + - keyword.operator.minus.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: L + scopes: + - keyword.other.unit.suffix.floating-point +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '0' + scopesBegin: + - constant.numeric.hexadecimal +- source: . +- source: '53' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '84' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '92' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '-' + scopes: + - keyword.operator.minus.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '5' + scopesBegin: + - constant.numeric.hexadecimal +- source: . + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: + + scopes: + - keyword.operator.plus.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '13' + scopesBegin: + - constant.numeric.hexadecimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '98' +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: '04' +- source: . +- source: '234985' + scopesEnd: + - constant.numeric.hexadecimal +- source: p + scopes: + - keyword.other.unit.exponent.hexadecimal +- source: '10' + scopes: + - constant.numeric.exponent.hexadecimal +- source: L + scopes: + - keyword.other.unit.suffix.floating-point +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' custom literals' + scopesEnd: + - comment.line.double-slash +- source: '29042' + scopes: + - constant.numeric.decimal +- source: ms + scopes: + - keyword.other.unit.user-defined +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: abcdef + scopes: + - constant.numeric.hexadecimal +- source: mm + scopes: + - keyword.other.unit.user-defined +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: abc + scopesBegin: + - constant.numeric.hexadecimal +- source: '''' + scopes: + - punctuation.separator.constant.numeric +- source: def + scopesEnd: + - constant.numeric.hexadecimal +- source: mm + scopes: + - keyword.other.unit.user-defined +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: abcdef + scopes: + - constant.numeric.hexadecimal +- source: yards + scopes: + - keyword.other.unit.user-defined +- source: '20' + scopes: + - constant.numeric.decimal +- source: ounces + scopes: + - keyword.other.unit.user-defined +- source: '2000' + scopes: + - constant.numeric.decimal +- source: miles + scopes: + - keyword.other.unit.user-defined +- source: L + scopesBegin: + - string.quoted.double + - punctuation.definition.string.begin + scopes: + - meta.encoding +- source: '"' + scopesEnd: + - punctuation.definition.string.begin +- source: akdjfhald +- source: '"' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.double +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' invalid literals' + scopesEnd: + - comment.line.double-slash +- source: 1Ex + scopesBegin: + - invalid.illegal.constant.numeric +- source: 0xe+foo +- source: 0x1Px +- source: 0xAB.cdpfl +- source: 0x12345'luyards +- source: 0.'123 +- source: 0'.123 +- source: 1E'1 +- source: 1'E1 + scopesEnd: + - invalid.illegal.constant.numeric +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' odd valid literals' + scopesEnd: + - comment.line.double-slash +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '12345' + scopes: + - constant.numeric.hexadecimal +- source: luyards + scopes: + - keyword.other.unit.user-defined +- source: '0' + scopes: + - keyword.other.unit.octal +- source: '''' + scopesBegin: + - constant.numeric.octal + scopes: + - punctuation.separator.constant.numeric +- source: '12345' + scopesEnd: + - constant.numeric.octal +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 1E + scopes: + - constant.numeric.hexadecimal +- source: x + scopes: + - keyword.other.unit.user-defined +- source: '1' + scopes: + - constant.numeric.decimal +- source: Px + scopes: + - keyword.other.unit.user-defined +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' chars' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: '1' +- source: '''' + scopes: + - punctuation.definition.string.end +- source: '''' + scopes: + - punctuation.definition.string.begin +- source: a +- source: '''' + scopes: + - punctuation.definition.string.end +- source: '''' + scopes: + - punctuation.definition.string.begin +- source: \n + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end +- source: '''' + scopes: + - punctuation.definition.string.begin +- source: \0 + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Strings' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin +- source: things +- source: \n + scopesBegin: + - constant.character.escape +- source: \b +- source: \v +- source: \t + scopesEnd: + - constant.character.escape +- source: '"' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.double +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' operator words' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: '1' + scopes: + - constant.numeric.decimal +- source: and + scopes: + - keyword.operator.wordlike + - keyword.operator.and +- source: '1' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: '1' + scopes: + - constant.numeric.decimal +- source: or + scopes: + - keyword.operator.wordlike + - keyword.operator.or +- source: '1' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: '1' + scopes: + - constant.numeric.decimal +- source: xor + scopes: + - keyword.operator.wordlike + - keyword.operator.xor +- source: '1' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' type castings' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: dynamic_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.dynamic_cast +- source: < + scopes: + - keyword.operator.comparison +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'expression ' +- source: + + scopes: + - keyword.operator +- source: '1' + scopes: + - constant.numeric.decimal +- source: + + scopes: + - keyword.operator +- source: ' thing' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: reinterpret_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.reinterpret_cast +- source: < + scopes: + - keyword.operator.comparison +- source: double + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: expression +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: static_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.static_cast +- source: < + scopes: + - keyword.operator.comparison +- source: Custom +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: expression +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: const_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.const_cast +- source: < + scopes: + - keyword.operator.comparison +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: expression +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: dynamic_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.dynamic_cast +- source: < + scopes: + - keyword.operator.comparison +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'expression ' +- source: + + scopes: + - keyword.operator +- source: '1' + scopes: + - constant.numeric.decimal +- source: + + scopes: + - keyword.operator +- source: ' thing' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: reinterpret_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.reinterpret_cast +- source: < + scopes: + - keyword.operator.comparison +- source: double + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: expression +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: static_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.static_cast +- source: < + scopes: + - keyword.operator.comparison +- source: Custom +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: expression +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: const_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.const_cast +- source: < + scopes: + - keyword.operator.comparison +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: expression +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Storage types' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: pthread_rwlockattr_t + scopes: + - support.type.posix-reserved.pthread + - support.type.built-in.posix-reserved.pthread +- source: ' thing' +- source: ; + scopes: + - punctuation.terminator.statement +- source: pthread_rwlockattr_t + scopes: + - support.type.posix-reserved.pthread + - support.type.built-in.posix-reserved.pthread +- source: ' thing' +- source: ; + scopes: + - punctuation.terminator.statement +- source: decltype + scopes: + - keyword.operator.functionlike + - keyword.other.decltype + - storage.type.decltype +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.decltype +- source: int + scopes: + - meta.arguments.decltype + - storage.type.primitive + - storage.type.built-in.primitive +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.decltype +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' operators ' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: typeid + scopes: + - keyword.operator.functionlike + - keyword.operator.typeid +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.operator.typeid +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.operator.typeid +- source: sizeof + scopes: + - keyword.operator.functionlike + - keyword.operator.sizeof +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.operator.sizeof +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.operator.sizeof +- source: alignas + scopes: + - keyword.operator.functionlike + - keyword.operator.alignas +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.operator.alignas +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.operator.alignas +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Memory' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: new + scopes: + - keyword.operator.wordlike + - keyword.operator.new +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: '5' + scopes: + - constant.numeric.decimal +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: delete + scopes: + - keyword.operator.wordlike + - keyword.operator.delete +- source: ' a' +- source: ; + scopes: + - punctuation.terminator.statement +- source: new + scopes: + - keyword.operator.wordlike + - keyword.operator.new +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: '&' + scopes: + - keyword.operator +- source: a_storage_of_callable + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: callable + scopes: + - variable.other.property +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: type + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: forward + scopes: + - entity.name.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: Callable + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: a_callable +- source: ) + scopesBegin: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ) + scopesEnd: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '*' + scopes: + - keyword.operator +- source: 'array ' +- source: = + scopes: + - keyword.operator.assignment +- source: new + scopes: + - keyword.operator.wordlike + - keyword.operator.new +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '100' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: ; + scopes: + - punctuation.terminator.statement +- source: delete + scopesBegin: + - keyword.operator.wordlike + scopes: + - keyword.operator.delete.array +- source: '[]' + scopes: + - keyword.operator.delete.array.bracket + scopesEnd: + - keyword.operator.wordlike +- source: ' array' +- source: ; + scopes: + - punctuation.terminator.statement +- source: char + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' should_always_be_a_newline' +- source: ; + scopes: + - punctuation.terminator.statement +- source: char + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' deleter' +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' namespaces' +- source: // + scopesBegin: + - punctuation.definition.comment +- source: // + scopesEnd: + - comment.line.double-slash + - punctuation.definition.comment +- source: using + scopesBegin: + - meta.using-namespace + scopes: + - keyword.other.using.directive +- source: namespace + scopes: + - keyword.other.namespace.directive + - storage.type.namespace.directive +- source: std + scopes: + - entity.name.namespace +- source: ; + scopes: + - punctuation.terminator.statement +- source: using + scopes: + - keyword.other.using.directive +- source: namespace + scopes: + - keyword.other.namespace.directive + - storage.type.namespace.directive +- source: std + scopes: + - entity.name.namespace +- source: ; + scopes: + - punctuation.terminator.statement +- source: using + scopes: + - keyword.other.using.directive +- source: namespace + scopes: + - keyword.other.namespace.directive + - storage.type.namespace.directive +- source: std + scopes: + - entity.name.namespace +- source: ; + scopes: + - punctuation.terminator.statement +- source: using + scopes: + - keyword.other.using.directive +- source: namespace + scopes: + - keyword.other.namespace.directive + - storage.type.namespace.directive +- source: parent_namespace + scopes: + - entity.name.scope-resolution.namespace.using +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution.namespace.using +- source: std + scopes: + - entity.name.namespace +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.using-namespace +- source: inline + scopes: + - storage.modifier.specifier.functional.pre-parameters.inline +- source: namespace + scopesBegin: + - meta.block.namespace + - meta.head.namespace + scopes: + - keyword.other.namespace.definition + - storage.type.namespace.definition +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.namespace + scopesEnd: + - meta.head.namespace +- source: '}' + scopes: + - meta.body.namespace + - punctuation.section.block.end.bracket.curly.namespace + scopesEnd: + - meta.block.namespace +- source: ; + scopes: + - punctuation.terminator.statement +- source: namespace + scopesBegin: + - meta.block.namespace + - meta.head.namespace + scopes: + - keyword.other.namespace.definition + - storage.type.namespace.definition +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.namespace + scopesEnd: + - meta.head.namespace +- source: '}' + scopes: + - meta.body.namespace + - punctuation.section.block.end.bracket.curly.namespace + scopesEnd: + - meta.block.namespace +- source: ; + scopes: + - punctuation.terminator.statement +- source: namespace + scopesBegin: + - meta.block.namespace + - meta.head.namespace + scopes: + - keyword.other.namespace.definition + - storage.type.namespace.definition +- source: scoped + scopes: + - entity.name.scope-resolution.namespace.block +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution.namespace.block +- source: console + scopes: + - entity.name.namespace +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.namespace + scopesEnd: + - meta.head.namespace +- source: '}' + scopes: + - meta.body.namespace + - punctuation.section.block.end.bracket.curly.namespace + scopesEnd: + - meta.block.namespace +- source: ; + scopes: + - punctuation.terminator.statement +- source: namespace + scopesBegin: + - meta.block.namespace + - meta.head.namespace + scopes: + - keyword.other.namespace.definition + - storage.type.namespace.definition +- source: console + scopes: + - entity.name.namespace +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.namespace + scopesEnd: + - meta.head.namespace +- source: template + scopesBegin: + - meta.body.namespace + - meta.template.definition + scopes: + - storage.type.template +- source: < + scopes: + - punctuation.section.angle-brackets.start.template.definition +- source: typename + scopes: + - storage.type.template.argument.typename +- source: ANYTYPE + scopes: + - entity.name.type.template +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.definition + scopesEnd: + - meta.template.definition +- source: void + scopesBegin: + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: __MAGIC__show + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ANYTYPE + scopesBegin: + - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter +- source: input + scopes: + - variable.parameter + scopesEnd: + - meta.function.definition.parameters + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: // + scopesBegin: + - meta.body.function.definition + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' by default use the stream operator with cout' + scopesEnd: + - comment.line.double-slash +- source: std + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: 'cout ' +- source: '<<' + scopes: + - keyword.operator.bitwise.shift +- source: ' input' +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition + scopesEnd: + - meta.function.definition + - meta.body.function.definition +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.namespace + scopesEnd: + - meta.block.namespace + - meta.body.namespace +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Scope resolution' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: std + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: 'cout ' +- source: '<<' + scopes: + - keyword.operator.bitwise.shift +- source: ' input' +- source: ; + scopes: + - punctuation.terminator.statement +- source: numeric_limits + scopes: + - entity.name.scope-resolution +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: long + scopesBegin: + - storage.type.primitive + - storage.type.built-in.primitive +- source: double + scopesEnd: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: infinity + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: char_traits + scopes: + - entity.name.scope-resolution +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: ANYTYPE + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: eof + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: numeric_limits + scopes: + - entity.name.scope-resolution +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: streamsize + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: max + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: Task + scopes: + - entity.name.scope-resolution +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: ANY_OUTPUT_TYPE + scopes: + - storage.type.user-defined +- source: ',' + scopes: + - comma + - punctuation.separator.template.argument +- source: ANY_INPUT_TYPE + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: links_to +- source: ; + scopes: + - punctuation.terminator.statement +- source: '&' + scopes: + - keyword.operator +- source: TEST_CLASS + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: name +- source: ; + scopes: + - punctuation.terminator.statement +- source: Event + scopes: + - entity.name.scope-resolution +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: ANYTYPE + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: ListenersFor + scopesBegin: + - meta.bracket.square.access + scopes: + - variable.other.object +- source: '[' + scopes: + - punctuation.definition.begin.bracket.square +- source: input_event + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: name + scopes: + - variable.other.property +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: std + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: allocator_traits + scopes: + - entity.name.scope-resolution.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: decltype + scopes: + - keyword.operator.functionlike + - keyword.other.decltype + - storage.type.decltype +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.decltype +- source: acopy + scopes: + - meta.arguments.decltype +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.decltype +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution.function.call +- source: destroy + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: acopy +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: this + scopes: + - variable.language.this +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: std + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: allocator_traits + scopes: + - entity.name.scope-resolution.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: decltype + scopes: + - keyword.operator.functionlike + - keyword.other.decltype + - storage.type.decltype +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.decltype +- source: acopy + scopes: + - meta.arguments.decltype +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.decltype +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution.function.call +- source: deallocate + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: acopy +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: this + scopes: + - variable.language.this +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' member access' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: window + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: as + scopes: + - variable.other.object.property +- source: . + scopes: + - punctuation.separator.dot-access +- source: translate + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '0' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: '0' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '5' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: '0' + scopes: + - constant.numeric.decimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: window + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: MV + scopes: + - variable.other.object.property +- source: . + scopes: + - punctuation.separator.dot-access +- source: translate + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '0' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: '0' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '5' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: '0' + scopes: + - constant.numeric.decimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.object.property +- source: . + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.object.property +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.object.property +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.object.property +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.object.property +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.object.property +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.object.property +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.object.property +- source: . + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: ptr_to_original + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: Start + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: ptr_to_original + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: Start + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: ptr_to_original + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: Start + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: ptr_to_original + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: Start + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: . + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thing + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: thread + scopes: + - variable.other.property +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly +- source: a_pointer + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: a_pointer + scopes: + - variable.other.object.access +- source: .* + scopes: + - punctuation.separator.dot-access +- source: thread + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: ptr_to_original + scopes: + - variable.other.object.access +- source: '->' + scopes: + - punctuation.separator.pointer-access +- source: Start + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: ptr_to_original + scopes: + - variable.other.object.access +- source: '->*' + scopes: + - punctuation.separator.pointer-access +- source: Start + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Operator keyword' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: ' ostream' +- source: '&' + scopes: + - keyword.operator +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: '<<' + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: ostream + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: '&' + scopes: + - storage.modifier.reference +- source: out + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: const + scopes: + - storage.modifier.specifier.$5 +- source: Item + scopes: + - entity.name.type.parameter +- source: '&' + scopes: + - storage.modifier.reference +- source: input_ + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: ; + scopes: + - punctuation.terminator.statement +- source: ' Item ' +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: + + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: const + scopesBegin: + - meta.parameter + scopes: + - storage.modifier.specifier.const +- source: string + scopes: + - entity.name.type.parameter +- source: '&' + scopes: + - storage.modifier.reference +- source: base + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: const + scopes: + - storage.modifier.specifier.$5 +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '&' + scopes: + - storage.modifier.reference +- source: repetitions + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: ; + scopes: + - punctuation.terminator.statement +- source: ' Item ' +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: '-' + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: const + scopesBegin: + - meta.parameter + scopes: + - storage.modifier.specifier.const +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '&' + scopes: + - storage.modifier.reference +- source: the_input + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: const + scopes: + - storage.modifier.specifier.$5 +- source: Item + scopes: + - entity.name.type.parameter +- source: '&' + scopes: + - storage.modifier.reference +- source: input_item + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: ; + scopes: + - punctuation.terminator.statement +- source: ' Item ' +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: / + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: const + scopesBegin: + - meta.parameter + scopes: + - storage.modifier.specifier.const +- source: Item + scopes: + - entity.name.type.parameter +- source: '&' + scopes: + - storage.modifier.reference +- source: input_item + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: const + scopes: + - storage.modifier.specifier.$5 +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '&' + scopes: + - storage.modifier.reference +- source: the_input + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: ; + scopes: + - punctuation.terminator.statement +- source: ' Item ' +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: ^ + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: const + scopesBegin: + - meta.parameter + scopes: + - storage.modifier.specifier.const +- source: Item + scopes: + - entity.name.type.parameter +- source: '&' + scopes: + - storage.modifier.reference +- source: input_item + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: const + scopes: + - storage.modifier.specifier.$5 +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '&' + scopes: + - storage.modifier.reference +- source: the_input + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' implicit conversions' + scopesEnd: + - comment.line.double-slash +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: std + scopesBegin: + - entity.name.operator.overloadee + scopes: + - entity.name.scope-resolution.function.definition.operator-overload +- source: '::' + scopes: + - punctuation.separator.namespace.access + - >- + punctuation.separator.scope-resolution.function.definition.operator-overload +- source: string + scopesEnd: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: const + scopes: + - storage.modifier.specifier.functional.post-parameters.const +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: ; + scopes: + - punctuation.terminator.statement +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: ' double' + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: const + scopes: + - storage.modifier.specifier.functional.post-parameters.const +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' custom literal' + scopesEnd: + - comment.line.double-slash +- source: void + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' operator ' +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin +- source: '"' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.double +- source: _km + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: long + scopesBegin: + - storage.type.primitive + - storage.type.built-in.primitive +- source: double + scopesEnd: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' preprocessor' +- source: // + scopesBegin: + - punctuation.definition.comment +- source: // + scopesEnd: + - comment.line.double-slash + - punctuation.definition.comment +- source: '#' + scopesBegin: + - meta.preprocessor.macro + - keyword.control.directive.define + scopes: + - punctuation.definition.directive +- source: define + scopesEnd: + - keyword.control.directive.define +- source: Infinite + scopes: + - entity.name.function.preprocessor +- source: numeric_limits + scopes: + - entity.name.scope-resolution +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: long + scopesBegin: + - storage.type.primitive + - storage.type.built-in.primitive +- source: double + scopesEnd: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: infinity + scopesBegin: + - meta.function + scopes: + - entity.name.function +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round + scopesEnd: + - meta.function +- source: '#' + scopesBegin: + - keyword.control.directive.define + scopes: + - punctuation.definition.directive +- source: define + scopesEnd: + - keyword.control.directive.define +- source: DoubleMax + scopes: + - entity.name.function.preprocessor +- source: '1' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '79769' + scopes: + - constant.numeric.decimal +- source: e + scopes: + - keyword.other.unit.exponent.decimal +- source: + + scopes: + - keyword.operator.plus.exponent.decimal +- source: '308' + scopes: + - constant.numeric.exponent.decimal +- source: '#' + scopesBegin: + - keyword.control.directive.define + scopes: + - punctuation.definition.directive +- source: define + scopesEnd: + - keyword.control.directive.define +- source: Pi + scopes: + - entity.name.function.preprocessor +- source: '3' + scopes: + - constant.numeric.decimal +- source: . + scopes: + - constant.numeric.decimal.point +- source: '1415926535897932384626' + scopes: + - constant.numeric.decimal +- source: '#' + scopesBegin: + - keyword.control.directive.define + scopes: + - punctuation.definition.directive +- source: define + scopesEnd: + - keyword.control.directive.define +- source: show + scopes: + - entity.name.function.preprocessor +- source: ( + scopes: + - punctuation.definition.parameters.begin +- source: argument + scopes: + - variable.parameter.preprocessor +- source: ) + scopes: + - punctuation.definition.parameters.end +- source: ' cout ' +- source: '<<' + scopes: + - keyword.operator.bitwise.shift +- source: '#argument' + scopes: + - variable.other.macro.argument +- source: '<<' + scopes: + - keyword.operator.bitwise.shift +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin +- source: \n + scopes: + - constant.character.escape +- source: '"' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.double +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.preprocessor.macro +- source: '#' + scopesBegin: + - meta.preprocessor + - keyword.control.directive.conditional + scopes: + - punctuation.definition.directive +- source: ifndef + scopesEnd: + - keyword.control.directive.conditional +- source: CEKO_LIBRARY + scopes: + - entity.name.function.preprocessor + scopesEnd: + - meta.preprocessor +- source: '#' + scopesBegin: + - meta.preprocessor.macro + - keyword.control.directive.define + scopes: + - punctuation.definition.directive +- source: define + scopesEnd: + - keyword.control.directive.define +- source: CEKO_LIBRARY + scopes: + - entity.name.function.preprocessor + scopesEnd: + - meta.preprocessor.macro +- source: '#' + scopesBegin: + - meta.preprocessor + - keyword.control.directive.conditional + scopes: + - punctuation.definition.directive +- source: endif + scopesEnd: + - meta.preprocessor + - keyword.control.directive.conditional +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' templates' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: void + scopesBegin: + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: func + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: std + scopesBegin: + - meta.body.function.definition + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: 'cout ' +- source: '<<' + scopes: + - keyword.operator.bitwise.shift +- source: max + scopes: + - entity.name.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: a +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: ' b' +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: '<<' + scopes: + - keyword.operator.bitwise.shift +- source: std + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: endl +- source: ; + scopes: + - punctuation.terminator.statement +- source: std + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: 'cout ' +- source: '<<' + scopes: + - keyword.operator.bitwise.shift +- source: max + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: a +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: ' b' +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: '<<' + scopes: + - keyword.operator.bitwise.shift +- source: std + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: endl +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition + scopesEnd: + - meta.function.definition + - meta.body.function.definition +- source: namespace + scopesBegin: + - meta.block.namespace + - meta.head.namespace + scopes: + - keyword.other.namespace.definition + - storage.type.namespace.definition +- source: test + scopes: + - entity.name.namespace +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.namespace + scopesEnd: + - meta.head.namespace +- source: template + scopesBegin: + - meta.body.namespace + scopes: + - storage.type.template +- source: < + scopes: + - punctuation.section.angle-brackets.start.template.definition +- source: class + scopesBegin: + - meta.template.definition + scopes: + - storage.type.template.argument.class +- source: T + scopes: + - entity.name.type.template + scopesEnd: + - meta.template.definition +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.definition +- source: '#' + scopesBegin: + - meta.preprocessor + - keyword.control.directive.conditional + scopes: + - punctuation.definition.directive +- source: ifdef + scopesEnd: + - keyword.control.directive.conditional +- source: blah + scopes: + - entity.name.function.preprocessor + scopesEnd: + - meta.preprocessor +- source: struct + scopesBegin: + - meta.block.struct + - meta.head.struct + scopes: + - storage.type.struct +- source: test + scopes: + - entity.name.type.struct +- source: '#endif' + scopes: + - 'keyword.control.directive.#endif' +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.struct + scopesEnd: + - meta.head.struct +- source: // + scopesBegin: + - meta.body.struct + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' seperate line template' + scopesEnd: + - comment.line.double-slash +- source: template + scopes: + - storage.type.template +- source: < + scopes: + - punctuation.section.angle-brackets.start.template.definition +- source: 'class ' + scopesBegin: + - meta.template.definition + scopes: + - storage.type.template +- source: U + scopes: + - entity.name.type.template +- source: = + scopes: + - keyword.operator.assignment +- source: std + scopes: + - entity.name.scope-resolution.template.definition +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution.template.definition +- source: vector +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.definition + - meta.template.call + - meta.template.call +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.definition +- source: template + scopes: + - storage.type.template +- source: < + scopes: + - punctuation.section.angle-brackets.start.template.definition +- source: typename + scopesBegin: + - meta.template.definition + scopes: + - storage.type.template.argument.typename +- source: RETURN_TYPE + scopes: + - entity.name.type.template +- source: ',' + scopes: + - comma + - punctuation.separator.template.argument +- source: 'int ' + scopes: + - storage.type.template +- source: 'N' + scopes: + - entity.name.type.template +- source: = + scopes: + - keyword.operator.assignment +- source: '0' + scopes: + - constant.numeric.decimal +- source: '>' + scopes: + - keyword.operator.comparison +- source: '1' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: typename + scopes: + - storage.type.template.argument.typename +- source: Callable + scopes: + - entity.name.type.template + scopesEnd: + - meta.template.definition +- source: '> ' + scopes: + - punctuation.section.angle-brackets.end.template.definition +- source: bool + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: () + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: U + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: k + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.struct + scopesEnd: + - meta.body.struct +- source: ; + scopes: + - punctuation.terminator.statement +- source: struct + scopesBegin: + - meta.head.struct + scopes: + - storage.type.struct +- source: test2 + scopes: + - entity.name.type.struct +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.struct + scopesEnd: + - meta.head.struct +- source: // + scopesBegin: + - meta.body.struct + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' same-line template' + scopesEnd: + - comment.line.double-slash +- source: template + scopesBegin: + - meta.template.definition + scopes: + - storage.type.template +- source: < + scopes: + - punctuation.section.angle-brackets.start.template.definition +- source: 'class ' + scopes: + - storage.type.template +- source: U + scopes: + - entity.name.type.template +- source: = + scopes: + - keyword.operator.assignment +- source: std + scopes: + - entity.name.scope-resolution.template.definition +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution.template.definition +- source: vector +- source: < + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.definition + scopesEnd: + - meta.template.definition +- source: bool + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: () + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: U + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: k + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.struct + scopesEnd: + - meta.body.struct +- source: ; + scopes: + - punctuation.terminator.statement +- source: struct + scopesBegin: + - meta.head.struct + scopes: + - storage.type.struct +- source: test3 + scopes: + - entity.name.type.struct +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.struct + scopesEnd: + - meta.head.struct +- source: // + scopesBegin: + - meta.body.struct + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' same-line template' + scopesEnd: + - comment.line.double-slash +- source: template + scopesBegin: + - meta.template.definition + scopes: + - storage.type.template +- source: < + scopes: + - punctuation.section.angle-brackets.start.template.definition +- source: 'class ' + scopes: + - storage.type.template +- source: U + scopes: + - entity.name.type.template +- source: = + scopes: + - keyword.operator.assignment +- source: std + scopes: + - entity.name.scope-resolution.template.definition +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution.template.definition +- source: vector +- source: < + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.definition + scopesEnd: + - meta.template.definition +- source: bool + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: () + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: U + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: k + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.struct + scopesEnd: + - meta.body.struct +- source: ; + scopes: + - punctuation.terminator.statement +- source: struct + scopesBegin: + - meta.head.struct + scopes: + - storage.type.struct +- source: test2 + scopes: + - entity.name.type.struct +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.struct + scopesEnd: + - meta.head.struct +- source: bool + scopesBegin: + - meta.body.struct + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: () + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: = + scopes: + - keyword.operator.assignment +- source: delete + scopes: + - keyword.operator.wordlike + - keyword.operator.delete +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.struct + scopesEnd: + - meta.body.struct +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.struct +- source: ' } ' +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' namespace test' +- source: // + scopes: + - punctuation.definition.comment +- source: ' no syntax highlighting' + scopesEnd: + - comment.line.double-slash +- source: class + scopesBegin: + - meta.block.class + - meta.head.class + scopes: + - storage.type.class +- source: test2 + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.class +- source: template + scopes: + - storage.type.template +- source: < + scopes: + - punctuation.section.angle-brackets.start.template.definition +- source: int + scopesBegin: + - meta.template.definition + scopes: + - storage.type.template.argument.int +- source: ',' + scopes: + - comma + - punctuation.separator.template.argument +- source: typename + scopes: + - storage.type.template.argument.typename +- source: Callable + scopes: + - entity.name.type.template +- source: ',' + scopes: + - comma + - punctuation.separator.template.argument +- source: typename + scopes: + - storage.type.template.argument.typename +- source: Ret + scopes: + - entity.name.type.template +- source: ',' + scopes: + - comma + - punctuation.separator.template.argument +- source: typename + scopes: + - storage.type.template +- source: ... + scopes: + - ellipses + - punctuation.vararg-ellipses.template.definition +- source: Args + scopes: + - entity.name.type.template + scopesEnd: + - meta.template.definition +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.definition +- source: auto + scopesBegin: + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: internalConversionToFuncPtr + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: Callable + scopesBegin: + - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter +- source: '&&' + scopes: + - storage.modifier.reference +- source: a_callable + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: Ret + scopes: + - meta.qualified_type + - entity.name.type +- source: ( + scopes: + - punctuation.section.parens.begin.bracket.round.function.pointer +- source: '*' + scopes: + - punctuation.definition.function.pointer.dereference +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round.function.pointer +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.function.pointer +- source: Args + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: ... + scopes: + - punctuation.vararg-ellipses + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.function.pointer + scopesEnd: + - meta.function.definition.parameters + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: static + scopesBegin: + - meta.body.function.definition + scopes: + - storage.modifier.specifier.$5 +- source: bool + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' used ' +- source: = + scopes: + - keyword.operator.assignment +- source: 'false' + scopes: + - constant.language.false +- source: ; + scopes: + - punctuation.terminator.statement +- source: static + scopes: + - storage.modifier.specifier.$5 +- source: ' storage' +- source: < + scopes: + - keyword.operator.comparison +- source: Callable +- source: '>' + scopes: + - keyword.operator.comparison +- source: ' a_storage_of_callable' +- source: ; + scopes: + - punctuation.terminator.statement +- source: using + scopesBegin: + - meta.declaration.type.alias + scopes: + - keyword.other.using.directive +- source: type + scopes: + - meta.qualified_type + - entity.name.type +- source: = + scopes: + - keyword.operator.assignment +- source: decltype + scopesBegin: + - meta.declaration.type.alias.value.unknown + scopes: + - keyword.operator.functionlike + - keyword.other.decltype + - storage.type.decltype +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.decltype +- source: a_storage_of_callable + scopesBegin: + - meta.arguments.decltype + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: callable + scopes: + - variable.other.property + scopesEnd: + - meta.arguments.decltype +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.decltype + scopesEnd: + - meta.declaration.type.alias.value.unknown +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.declaration.type.alias +- source: if + scopes: + - keyword.control.if +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: used +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: a_storage_of_callable + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: callable + scopes: + - variable.other.property +- source: . +- source: '~' + scopes: + - keyword.operator +- source: type + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: new + scopes: + - keyword.operator.wordlike + - keyword.operator.new +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: '&' + scopes: + - keyword.operator +- source: a_storage_of_callable + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: callable + scopes: + - variable.other.property +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: type + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: forward + scopes: + - entity.name.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: Callable + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: a_callable +- source: ) + scopesBegin: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ) + scopesEnd: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: ' used ' +- source: = + scopes: + - keyword.operator.assignment +- source: 'true' + scopes: + - constant.language.true +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' lambda ' + scopesEnd: + - comment.line.double-slash +- source: return + scopes: + - keyword.control.return +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: ( + scopesBegin: + - meta.function.definition.parameters.lambda + scopes: + - punctuation.definition.parameters.begin.lambda +- source: Args + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: ... + scopes: + - punctuation.vararg-ellipses +- source: args + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.definition.parameters.end.lambda + scopesEnd: + - meta.function.definition.parameters.lambda +- source: '->' + scopes: + - punctuation.definition.lambda.return-type +- source: ' Ret ' + scopes: + - storage.type.return-type.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: return + scopes: + - keyword.control.return +- source: Ret + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: a_storage_of_callable + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: callable + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: forward + scopes: + - entity.name.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: Args + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: args +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ... +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition + scopesEnd: + - meta.function.definition + - meta.body.function.definition +- source: template + scopes: + - storage.type.template +- source: < + scopes: + - punctuation.section.angle-brackets.start.template.definition +- source: typename + scopesBegin: + - meta.template.definition + scopes: + - storage.type.template.argument.typename +- source: RETURN_TYPE + scopes: + - entity.name.type.template +- source: ',' + scopes: + - comma + - punctuation.separator.template.argument +- source: 'int ' + scopes: + - storage.type.template +- source: 'N' + scopes: + - entity.name.type.template +- source: = + scopes: + - keyword.operator.assignment +- source: '0' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: typename + scopes: + - storage.type.template.argument.typename +- source: Callable + scopes: + - entity.name.type.template + scopesEnd: + - meta.template.definition +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.definition +- source: RETURN_TYPE + scopesBegin: + - meta.function.definition + scopes: + - meta.qualified_type + - entity.name.type +- source: '*' + scopesBegin: + - meta.head.function.definition + scopes: + - storage.modifier.pointer +- source: convertToFunctionPointer + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: Callable + scopesBegin: + - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter +- source: '&&' + scopes: + - storage.modifier.reference +- source: c + scopes: + - variable.parameter + scopesEnd: + - meta.function.definition.parameters + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: return + scopesBegin: + - meta.body.function.definition + scopes: + - keyword.control.return +- source: internalConversionToFuncPtr + scopes: + - entity.name.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: 'N' + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: forward + scopes: + - entity.name.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: Callable + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: c +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: ' (' + scopesBegin: + - meta.type.cast +- source: RETURN_TYPE + scopes: + - meta.qualified_type + - entity.name.type +- source: '*' + scopes: + - storage.modifier.pointer +- source: ) + scopesEnd: + - meta.type.cast +- source: nullptr + scopes: + - constant.language.nullptr +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition + scopesEnd: + - meta.function.definition + - meta.body.function.definition +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Classes' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: class + scopesBegin: + - meta.block.class + - meta.head.class + scopes: + - storage.type.class +- source: Thing + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: public + scopesBegin: + - meta.body.class + - storage.type.modifier.access.control.public +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control +- source: 'public ' +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control + scopesEnd: + - storage.type.modifier.access.control.public +- source: 'private ' + scopesBegin: + - storage.type.modifier.access.control.private +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control +- source: private +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control + scopesEnd: + - storage.type.modifier.access.control.private +- source: protected + scopesBegin: + - storage.type.modifier.access.control.protected +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control + scopesEnd: + - storage.type.modifier.access.control.protected +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: '1' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: Thing + scopesBegin: + - meta.function.constructor + scopes: + - entity.name.function.constructor +- source: ( + scopes: + - punctuation.definition.parameters.begin.constructor +- source: ) + scopes: + - punctuation.definition.parameters.end.constructor + scopesEnd: + - meta.function.constructor +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.class + scopesEnd: + - meta.body.class +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.class +- source: struct + scopesBegin: + - meta.block.struct + - meta.head.struct + scopes: + - storage.type.struct +- source: Thing2 + scopes: + - entity.name.type.struct +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.struct + scopesEnd: + - meta.head.struct +- source: public + scopesBegin: + - meta.body.struct + - storage.type.modifier.access.control.public +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control +- source: 'public ' +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control + scopesEnd: + - storage.type.modifier.access.control.public +- source: 'private ' + scopesBegin: + - storage.type.modifier.access.control.private +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control +- source: private +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control + scopesEnd: + - storage.type.modifier.access.control.private +- source: protected + scopesBegin: + - storage.type.modifier.access.control.protected +- source: ':' + scopes: + - colon + - punctuation.separator.delimiter.colon.access.control + scopesEnd: + - storage.type.modifier.access.control.protected +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: '1' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: Thing + scopesBegin: + - meta.function.constructor + scopes: + - entity.name.function.constructor +- source: ( + scopes: + - punctuation.definition.parameters.begin.constructor +- source: ) + scopes: + - punctuation.definition.parameters.end.constructor + scopesEnd: + - meta.function.constructor +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.struct + scopesEnd: + - meta.body.struct +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.struct +- source: class + scopesBegin: + - meta.block.class + - meta.head.class + scopes: + - storage.type.class +- source: A + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: void + scopesBegin: + - meta.body.class + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: A + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round + scopesEnd: + - meta.function.definition + - meta.head.function.definition +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.class + scopesEnd: + - meta.body.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: A + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: void + scopesBegin: + - meta.body.class + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: A + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round + scopesEnd: + - meta.function.definition + - meta.head.function.definition +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.class + scopesEnd: + - meta.body.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: A + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: void + scopesBegin: + - meta.body.class + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: A + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round + scopesEnd: + - meta.function.definition + - meta.head.function.definition +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.class + scopesEnd: + - meta.body.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: A + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: void + scopesBegin: + - meta.body.class + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: A + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round + scopesEnd: + - meta.function.definition + - meta.head.function.definition +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.class + scopesEnd: + - meta.body.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: ClassA + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: ClassE + scopes: + - entity.name.type.class +- source: final + scopes: + - storage.type.modifier.final +- source: ':' + scopes: + - colon + - punctuation.separator.inheritance + scopesEnd: + - meta.head.class +- source: public + scopes: + - storage.type.modifier.access.public +- source: ClassA + scopes: + - entity.name.type.inherited +- source: '{' + scopes: + - meta.head.class + - punctuation.section.block.begin.bracket.curly.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.class +- source: namespace + scopesBegin: + - meta.block.namespace + - meta.head.namespace + scopes: + - keyword.other.namespace.definition + - storage.type.namespace.definition +- source: foo + scopes: + - entity.name.namespace +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.namespace + scopesEnd: + - meta.head.namespace +- source: class + scopesBegin: + - meta.body.namespace + - meta.block.class + - meta.head.class + scopes: + - storage.type.class +- source: ClassF + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: ClassG + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.class +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.namespace + scopesEnd: + - meta.block.namespace + - meta.body.namespace +- source: class + scopesBegin: + - meta.block.class + - meta.head.class + scopes: + - storage.type.class +- source: ClassH + scopes: + - entity.name.type.class +- source: ':' + scopes: + - colon + - punctuation.separator.inheritance + scopesEnd: + - meta.head.class +- source: public + scopes: + - storage.type.modifier.access.public +- source: 'foo::ClassF' + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: public + scopes: + - storage.type.modifier.access.public +- source: 'foo::ClassG' + scopes: + - entity.name.type.inherited +- source: '{' + scopes: + - meta.head.class + - punctuation.section.block.begin.bracket.curly.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: foo + scopes: + - entity.name.type.class +- source: ':' + scopes: + - colon + - punctuation.separator.inheritance + scopesEnd: + - meta.head.class +- source: bar + scopes: + - entity.name.type.inherited +- source: '{' + scopes: + - meta.head.class + - punctuation.section.block.begin.bracket.curly.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: foo + scopes: + - entity.name.type.class +- source: ':' + scopes: + - colon + - punctuation.separator.inheritance + scopesEnd: + - meta.head.class +- source: public + scopes: + - storage.type.modifier.access.public +- source: bar + scopes: + - entity.name.type.inherited +- source: '{' + scopes: + - meta.head.class + - punctuation.section.block.begin.bracket.curly.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.class +- source: struct + scopesBegin: + - meta.block.struct + - meta.head.struct + scopes: + - storage.type.struct +- source: copy_storage_helper + scopes: + - entity.name.type.struct +- source: < + scopesBegin: + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: pointerT + scopes: + - storage.type.user-defined +- source: ',' + scopes: + - comma + - punctuation.separator.template.argument +- source: hashT + scopes: + - storage.type.user-defined +- source: ',' + scopes: + - comma + - punctuation.separator.template.argument +- source: allocatorT + scopes: + - storage.type.user-defined +- source: ',' + scopes: + - comma + - punctuation.separator.template.argument +- source: 'false' + scopes: + - constant.language.false +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' copyableT' + scopesEnd: + - comment.line.double-slash +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.struct + scopesEnd: + - meta.head.struct +- source: '[[' + scopesBegin: + - meta.body.struct + - support.other.attribute + scopes: + - punctuation.section.attribute.begin +- source: noreturn + scopes: + - entity.other.attribute.noreturn +- source: ']]' + scopes: + - punctuation.section.attribute.end + scopesEnd: + - support.other.attribute +- source: void + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: operator + scopesBegin: + - meta.function.definition.parameters.operator-overload + scopes: + - keyword.other.operator.overload +- source: () + scopes: + - entity.name.operator.overloadee +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round.operator-overload +- source: pointerT + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: /* + scopesBegin: + - comment.block + scopes: + - punctuation.definition.comment.begin +- source: ptr +- source: '*/' + scopes: + - punctuation.definition.comment.end + scopesEnd: + - comment.block +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: const + scopes: + - storage.modifier.specifier.const +- source: hashT + scopes: + - entity.name.type.parameter +- source: '&' + scopes: + - storage.modifier.reference +- source: /* + scopesBegin: + - comment.block + scopes: + - punctuation.definition.comment.begin +- source: hf +- source: '*/' + scopes: + - punctuation.definition.comment.end + scopesEnd: + - comment.block +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: pointerT + scopes: + - entity.name.type.parameter +- source: /* + scopesBegin: + - comment.block + scopes: + - punctuation.definition.comment.begin +- source: ptr_old +- source: '*/' + scopes: + - punctuation.definition.comment.end + scopesEnd: + - comment.block +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: size_t + scopes: + - storage.type + - storage.type.built-in +- source: /* + scopesBegin: + - comment.block + scopes: + - punctuation.definition.comment.begin +- source: 'off' +- source: '*/' + scopes: + - punctuation.definition.comment.end + scopesEnd: + - comment.block +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: size_t + scopes: + - storage.type + - storage.type.built-in +- source: /* + scopesBegin: + - comment.block + scopes: + - punctuation.definition.comment.begin +- source: cnt +- source: '*/' + scopes: + - punctuation.definition.comment.end + scopesEnd: + - meta.parameter + - comment.block +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round.operator-overload + scopesEnd: + - meta.function.definition.parameters.operator-overload +- source: const + scopes: + - storage.modifier.specifier.functional.post-parameters.const +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' `allocatorT::value_type` is not copy-constructible.' +- source: // + scopes: + - punctuation.definition.comment +- source: ' Throw an exception unconditionally, even when there is nothing to copy.' + scopesEnd: + - comment.line.double-slash +- source: noadl + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: sprintf_and_throw + scopes: + - entity.name.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: domain_error + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin +- source: 'cow_hashmap: `' +- source: '%s' + scopes: + - constant.other.placeholder +- source: '` is not copy-constructible.' +- source: '"' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.double +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: typeid + scopes: + - keyword.operator.functionlike + - keyword.operator.typeid +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.operator.typeid +- source: typename + scopesBegin: + - meta.arguments.operator.typeid + scopes: + - storage.modifier +- source: allocatorT + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: value_type + scopesEnd: + - meta.arguments.operator.typeid +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.operator.typeid +- source: . + scopes: + - punctuation.separator.dot-access +- source: name + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.struct + scopesEnd: + - meta.body.struct +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.struct +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' enums' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: enum + scopesBegin: + - meta.block.enum + - meta.head.enum + scopes: + - storage.type.enum +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.enum + scopesEnd: + - meta.head.enum +- source: thing + scopesBegin: + - meta.body.enum + scopes: + - meta.enum.definition + - variable.other.enummember +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.enum + scopesEnd: + - meta.body.enum +- source: ; + scopes: + - punctuation.terminator.statement +- source: enum + scopesBegin: + - meta.head.enum + scopes: + - storage.type.enum +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.enum + scopesEnd: + - meta.head.enum +- source: '}' + scopes: + - meta.body.enum + - punctuation.section.block.end.bracket.curly.enum +- source: ; + scopes: + - punctuation.terminator.statement +- source: enum + scopesBegin: + - meta.head.enum + scopes: + - storage.type.enum +- source: A + scopes: + - entity.name.type.enum +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.enum + scopesEnd: + - meta.head.enum +- source: a + scopesBegin: + - meta.body.enum + - meta.enum.definition + scopes: + - variable.other.enummember +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: b + scopes: + - variable.other.enummember + scopesEnd: + - meta.enum.definition +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.enum + scopesEnd: + - meta.body.enum +- source: ; + scopes: + - punctuation.terminator.statement +- source: enum + scopesBegin: + - meta.head.enum + scopes: + - storage.type.enum +- source: enum1 + scopes: + - entity.name.type.enum +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.enum + scopesEnd: + - meta.head.enum +- source: // + scopesBegin: + - meta.body.enum + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' comment' + scopesEnd: + - comment.line.double-slash +- source: definition + scopes: + - meta.enum.definition + - variable.other.enummember +- source: /* + scopesBegin: + - comment.block + scopes: + - punctuation.definition.comment.begin +- source: ' block comment ' +- source: '*/' + scopes: + - punctuation.definition.comment.end + scopesEnd: + - comment.block +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: definition3 + scopesBegin: + - meta.enum.definition + - variable.other.enummember +- source: definition + scopesEnd: + - variable.other.enummember +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: definition2 + scopes: + - variable.other.enummember + scopesEnd: + - meta.enum.definition +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' comment' + scopesEnd: + - comment.line.double-slash +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.enum + scopesEnd: + - meta.body.enum +- source: // + scopesBegin: + - meta.tail.enum + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' inheritance' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: class + scopesBegin: + - meta.block.class + - meta.head.class + scopes: + - storage.type.class +- source: foo + scopes: + - entity.name.type.class +- source: ':' + scopes: + - colon + - punctuation.separator.inheritance + scopesEnd: + - meta.head.class +- source: private + scopes: + - storage.type.modifier.access.private +- source: bar + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: quix + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: foo + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: public + scopes: + - storage.type.modifier.access.public +- source: bar + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: quix + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: foo + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: protected + scopes: + - storage.type.modifier.access.protected +- source: bar + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: quix + scopes: + - entity.name.type.inherited +- source: '{' + scopes: + - meta.head.class + - punctuation.section.block.begin.bracket.curly.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.class +- source: struct + scopes: + - storage.type.struct.declare +- source: foo + scopes: + - entity.name.type.struct +- source: f + scopes: + - variable.other.object.declare + scopesEnd: + - meta.tail.enum +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.enum +- source: class + scopes: + - storage.type.class.declare +- source: foo + scopes: + - entity.name.type.class +- source: f + scopes: + - variable.other.object.declare +- source: ; + scopes: + - punctuation.terminator.statement +- source: struct + scopesBegin: + - meta.block.struct + - meta.head.struct + scopes: + - storage.type.struct +- source: thing + scopes: + - entity.name.type.struct +- source: ':' + scopes: + - colon + - punctuation.separator.inheritance +- source: public + scopes: + - storage.type.modifier.access.public +- source: A + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: public + scopes: + - storage.type.modifier.access.public +- source: B + scopes: + - entity.name.type.inherited +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.struct + scopesEnd: + - meta.head.struct +- source: '}' + scopes: + - meta.body.struct + - punctuation.section.block.end.bracket.curly.struct +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.struct +- source: class + scopesBegin: + - meta.block.class + - meta.head.class + scopes: + - storage.type.class +- source: thing + scopes: + - entity.name.type.class +- source: ':' + scopes: + - colon + - punctuation.separator.inheritance +- source: public + scopes: + - storage.type.modifier.access.public +- source: A + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: public + scopes: + - storage.type.modifier.access.public +- source: B + scopes: + - entity.name.type.inherited +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter.inheritance +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.class +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Functions' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: template + scopes: + - storage.type.template +- source: < + scopes: + - punctuation.section.angle-brackets.start.template.definition +- source: class + scopesBegin: + - meta.template.definition + scopes: + - storage.type.template.argument.class +- source: ANYTYPE + scopes: + - entity.name.type.template + scopesEnd: + - meta.template.definition +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.definition +- source: string + scopesBegin: + - meta.function.definition + scopes: + - meta.qualified_type + - entity.name.type +- source: ToBinary + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ANYTYPE + scopesBegin: + - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter +- source: input + scopes: + - variable.parameter + scopesEnd: + - meta.function.definition.parameters + - meta.parameter +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: // + scopesBegin: + - meta.body.function.definition + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' depends on #include ' + scopesEnd: + - comment.line.double-slash +- source: return + scopes: + - keyword.control.return +- source: bitset + scopes: + - entity.name.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: '8' + scopes: + - constant.numeric.decimal +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: input +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: . + scopes: + - punctuation.separator.dot-access +- source: to_string + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition + scopesEnd: + - meta.function.definition + - meta.body.function.definition +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' lambdas' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: a + scopesBegin: + - meta.lambda.capture + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: b + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: c + scopes: + - variable.parameter.capture + scopesEnd: + - meta.lambda.capture +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: ( + scopesBegin: + - meta.function.definition.parameters.lambda + scopes: + - punctuation.definition.parameters.begin.lambda +- source: Args + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: ... + scopes: + - punctuation.vararg-ellipses +- source: args + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: thing1 + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.definition.parameters.end.lambda + scopesEnd: + - meta.function.definition.parameters.lambda +- source: '->' + scopes: + - punctuation.definition.lambda.return-type +- source: ' Ret ' + scopes: + - storage.type.return-type.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: a + scopesBegin: + - meta.lambda.capture + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: b + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: c + scopes: + - variable.parameter.capture + scopesEnd: + - meta.lambda.capture +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: ( + scopesBegin: + - meta.function.definition.parameters.lambda + scopes: + - punctuation.definition.parameters.begin.lambda +- source: Args + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: ... + scopes: + - punctuation.vararg-ellipses +- source: args + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: thing1 + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.definition.parameters.end.lambda + scopesEnd: + - meta.function.definition.parameters.lambda +- source: mutable + scopes: + - storage.modifier.lambda.mutable +- source: '->' + scopes: + - punctuation.definition.lambda.return-type +- source: ' Ret ' + scopes: + - storage.type.return-type.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: a + scopesBegin: + - meta.lambda.capture + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: b + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: c + scopes: + - variable.parameter.capture + scopesEnd: + - meta.lambda.capture +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: ( + scopesBegin: + - meta.function.definition.parameters.lambda + scopes: + - punctuation.definition.parameters.begin.lambda +- source: Args + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: ... + scopes: + - punctuation.vararg-ellipses +- source: args + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: thing1 + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.definition.parameters.end.lambda + scopesEnd: + - meta.function.definition.parameters.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: a + scopesBegin: + - meta.lambda.capture + scopes: + - variable.parameter.capture +- source: = + scopes: + - keyword.operator.assignment +- source: stuff + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: blah + scopesBegin: + - meta.bracket.square.access + scopes: + - variable.other.object +- source: '[' + scopes: + - punctuation.definition.begin.bracket.square +- source: '1324' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: b + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: c + scopes: + - variable.parameter.capture + scopesEnd: + - meta.lambda.capture +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: ( + scopesBegin: + - meta.function.definition.parameters.lambda + scopes: + - punctuation.definition.parameters.begin.lambda +- source: Args + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: ... + scopes: + - punctuation.vararg-ellipses +- source: args + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: thing1 + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.definition.parameters.end.lambda + scopesEnd: + - meta.function.definition.parameters.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: a + scopesBegin: + - meta.lambda.capture + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: b + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: c + scopes: + - variable.parameter.capture + scopesEnd: + - meta.lambda.capture +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: = + scopes: + - meta.lambda.capture + - keyword.operator.assignment +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: '->' + scopes: + - punctuation.definition.lambda.return-type +- source: ' int ' + scopes: + - storage.type.return-type.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: = + scopes: + - meta.lambda.capture + - keyword.operator.assignment +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: ( + scopesBegin: + - meta.function.definition.parameters.lambda + scopes: + - punctuation.definition.parameters.begin.lambda +- source: ) + scopes: + - punctuation.definition.parameters.end.lambda + scopesEnd: + - meta.function.definition.parameters.lambda +- source: mutable + scopes: + - storage.modifier.lambda.mutable +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: return + scopes: + - keyword.control.return +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: thing + scopesBegin: + - meta.bracket.square.access + scopes: + - variable.other.object +- source: '[' + scopes: + - punctuation.definition.begin.bracket.square +- source: '1' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square +- source: '[' + scopes: + - punctuation.definition.begin.bracket.square +- source: '2' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: ; + scopes: + - punctuation.terminator.statement +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: thing + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '2' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: ; + scopes: + - punctuation.terminator.statement +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: ( + scopesBegin: + - meta.function.definition.parameters.lambda + scopes: + - punctuation.definition.parameters.begin.lambda +- source: Args + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: ... + scopes: + - punctuation.vararg-ellipses +- source: args + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.definition.parameters.end.lambda + scopesEnd: + - meta.function.definition.parameters.lambda +- source: '->' + scopes: + - punctuation.definition.lambda.return-type +- source: ' Ret ' + scopes: + - storage.type.return-type.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: return + scopes: + - keyword.control.return +- source: Ret + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: a_storage_of_callable + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: callable + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: forward + scopes: + - entity.name.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: Args + scopes: + - storage.type.user-defined +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: args +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ... +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: ; + scopes: + - punctuation.terminator.statement +- source: return + scopes: + - keyword.control.return +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: a + scopesBegin: + - meta.lambda.capture + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: b + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: c + scopes: + - variable.parameter.capture + scopesEnd: + - meta.lambda.capture +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: ( + scopesBegin: + - meta.function.definition.parameters.lambda + scopes: + - punctuation.definition.parameters.begin.lambda +- source: Args + scopesBegin: + - meta.parameter + scopes: + - entity.name.type.parameter +- source: ... + scopes: + - punctuation.vararg-ellipses +- source: args + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: int + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: thing1 + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.definition.parameters.end.lambda + scopesEnd: + - meta.function.definition.parameters.lambda +- source: '->' + scopes: + - punctuation.definition.lambda.return-type +- source: ' Ret ' + scopes: + - storage.type.return-type.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: return + scopes: + - keyword.control.return +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: a + scopesBegin: + - meta.lambda.capture + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: b + scopes: + - variable.parameter.capture +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: c + scopes: + - variable.parameter.capture + scopesEnd: + - meta.lambda.capture +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: '->' + scopes: + - punctuation.definition.lambda.return-type +- source: ' int ' + scopes: + - storage.type.return-type.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' not lambdas' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: test + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: '[' + scopesBegin: + - meta.bracket.square.access + scopes: + - punctuation.definition.begin.bracket.square +- source: '0' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: = + scopes: + - keyword.operator.assignment +- source: '5' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' no syntax highlighting;' + scopesEnd: + - comment.line.double-slash +- source: test + scopesBegin: + - meta.bracket.square.access + scopes: + - variable.other.object +- source: '[' + scopes: + - punctuation.definition.begin.bracket.square +- source: '5' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square +- source: '[' + scopes: + - punctuation.definition.begin.bracket.square +- source: '5' + scopes: + - constant.numeric.decimal +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: = + scopes: + - keyword.operator.assignment +- source: '5' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: int + scopesBegin: + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: main + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.function.definition + scopesEnd: + - meta.head.function.definition +- source: int + scopesBegin: + - meta.body.function.definition + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' a ' +- source: = + scopes: + - keyword.operator.assignment +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: ' thing ' +- source: + + scopes: + - keyword.operator +- source: '10' + scopes: + - constant.numeric.decimal +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: return + scopes: + - keyword.control.return +- source: '0' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.function.definition + scopesEnd: + - meta.function.definition + - meta.body.function.definition +- source: // + scopesBegin: + - comment.line.double-slash + - punctuation.definition.comment +- source: // + scopesEnd: + - punctuation.definition.comment +- source: ' Attributes' +- source: // + scopes: + - punctuation.definition.comment + scopesEnd: + - comment.line.double-slash +- source: switch + scopes: + - keyword.control.switch +- source: ( + scopesBegin: + - meta.type.cast +- source: test + scopes: + - meta.qualified_type + - entity.name.type +- source: ) + scopesEnd: + - meta.type.cast +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: case + scopes: + - keyword.control.case +- source: '1' + scopes: + - constant.numeric.decimal +- source: ':' +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: case + scopes: + - keyword.control.case +- source: '2' + scopes: + - constant.numeric.decimal +- source: ': ' +- source: '[[' + scopesBegin: + - support.other.attribute + scopes: + - punctuation.section.attribute.begin +- source: fallthrough + scopes: + - entity.other.attribute.fallthrough +- source: ']]' + scopes: + - punctuation.section.attribute.end + scopesEnd: + - support.other.attribute +- source: ; + scopes: + - punctuation.terminator.statement +- source: case + scopes: + - keyword.control.case +- source: '3' + scopes: + - constant.numeric.decimal +- source: ': ' +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' no syntax highlighting' + scopesEnd: + - comment.line.double-slash +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: switch + scopes: + - keyword.control.switch +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: next +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \' + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \" + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \\ + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: '?' +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: next +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: a +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \a + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: b +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \b + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: f +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \f + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: 'n' +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \n + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: r +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \r + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: t +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \t + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: v +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \v + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: '0' +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \0 + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: Z +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \x1A + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: e +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: \x1B + scopes: + - constant.character.escape +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: U +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: ' xcnt ' +- source: += + scopes: + - keyword.operator.assignment.compound +- source: '2' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' 6: "\U123456"' + scopesEnd: + - comment.line.double-slash +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' Fallthrough.' + scopesEnd: + - comment.line.double-slash +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: u +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: ' xcnt ' +- source: += + scopes: + - keyword.operator.assignment.compound +- source: '2' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' 4: "\u1234"' + scopesEnd: + - comment.line.double-slash +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' Fallthrough.' + scopesEnd: + - comment.line.double-slash +- source: case + scopes: + - keyword.control.case +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: x +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ':' +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: ' xcnt ' +- source: += + scopes: + - keyword.operator.assignment.compound +- source: '2' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' 2: "\x12"' +- source: // + scopes: + - punctuation.definition.comment +- source: ' Read hex digits.' + scopesEnd: + - comment.line.double-slash +- source: if + scopes: + - keyword.control.if +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'qavail ' +- source: < + scopes: + - keyword.operator.comparison +- source: ' xcnt ' +- source: + + scopes: + - keyword.operator +- source: '2' + scopes: + - constant.numeric.decimal +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: throw + scopes: + - keyword.control.throw +- source: do_make_parser_error + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: reader +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: reader + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: size_avail + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: Parser_Error + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: code_escape_sequence_incomplete +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: char32_t + scopes: + - support.type.posix-reserved + - support.type.built-in.posix-reserved +- source: ' cpnt ' +- source: = + scopes: + - keyword.operator.assignment +- source: '0' + scopes: + - constant.numeric.decimal +- source: ; + scopes: + - punctuation.terminator.statement +- source: for + scopes: + - keyword.control.for +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' i ' +- source: = + scopes: + - keyword.operator.assignment +- source: ' tlen' +- source: ; + scopes: + - punctuation.terminator.statement +- source: ' i ' +- source: < + scopes: + - keyword.operator.comparison +- source: ' tlen ' +- source: + + scopes: + - keyword.operator +- source: ' xcnt' +- source: ; + scopes: + - punctuation.terminator.statement +- source: ++ + scopes: + - keyword.operator.increment +- source: i +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: static + scopes: + - storage.modifier.specifier.$5 +- source: constexpr + scopes: + - storage.modifier.specifier.functional.pre-parameters.constexpr +- source: char + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' s_digits[] ' +- source: = + scopes: + - keyword.operator.assignment +- source: '"' + scopesBegin: + - string.quoted.double + scopes: + - punctuation.definition.string.begin +- source: 00112233445566778899AaBbCcDdEeFf +- source: '"' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.double +- source: ; + scopes: + - punctuation.terminator.statement +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' dptr ' +- source: = + scopes: + - keyword.operator.assignment +- source: std + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: char_traits + scopes: + - entity.name.scope-resolution.function.call +- source: < + scopesBegin: + - meta.template.call + - meta.template.call + scopes: + - punctuation.section.angle-brackets.begin.template.call +- source: char + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - punctuation.section.angle-brackets.end.template.call + scopesEnd: + - meta.template.call + - meta.template.call +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution.function.call +- source: find + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: s_digits +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: '32' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: bptr + scopesBegin: + - meta.bracket.square.access + scopes: + - variable.other.object +- source: '[' + scopes: + - punctuation.definition.begin.bracket.square +- source: i +- source: ']' + scopes: + - punctuation.definition.end.bracket.square + scopesEnd: + - meta.bracket.square.access +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: if + scopes: + - keyword.control.if +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: '!' + scopes: + - keyword.operator.logical +- source: dptr +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: throw + scopes: + - keyword.control.throw +- source: do_make_parser_error + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: reader +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: ' i ' +- source: + + scopes: + - keyword.operator +- source: '1' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: Parser_Error + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: code_escape_sequence_invalid_hex +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' dvalue ' +- source: = + scopes: + - keyword.operator.assignment +- source: static_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.static_cast +- source: < + scopes: + - keyword.operator.comparison +- source: char32_t + scopes: + - support.type.posix-reserved + - support.type.built-in.posix-reserved +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'dptr ' +- source: '-' + scopes: + - keyword.operator +- source: ' s_digits' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: / + scopes: + - keyword.operator +- source: '2' + scopes: + - constant.numeric.decimal +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ; + scopes: + - punctuation.terminator.statement +- source: ' cpnt ' +- source: = + scopes: + - keyword.operator.assignment +- source: ' cpnt ' +- source: '*' + scopes: + - keyword.operator +- source: '16' + scopes: + - constant.numeric.decimal +- source: + + scopes: + - keyword.operator +- source: ' dvalue' +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: if + scopes: + - keyword.control.if +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'next ' +- source: == + scopes: + - keyword.operator.comparison +- source: '''' + scopesBegin: + - string.quoted.single + scopes: + - punctuation.definition.string.begin +- source: x +- source: '''' + scopes: + - punctuation.definition.string.end + scopesEnd: + - string.quoted.single +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' Write the character verbatim.' + scopesEnd: + - comment.line.double-slash +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: static_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.static_cast +- source: < + scopes: + - keyword.operator.comparison +- source: char + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: cpnt +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' Write a Unicode code point.' + scopesEnd: + - comment.line.double-slash +- source: if + scopes: + - keyword.control.if +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: D800 + scopes: + - constant.numeric.hexadecimal +- source: <= + scopes: + - keyword.operator.comparison +- source: ' cpnt' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '&&' + scopes: + - keyword.operator.logical +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'cpnt ' +- source: < + scopes: + - keyword.operator.comparison +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: E000 + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '||' + scopes: + - keyword.operator.logical +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '110000' + scopes: + - constant.numeric.hexadecimal +- source: <= + scopes: + - keyword.operator.comparison +- source: ' cpnt' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' Code point value is reserved or too large.' + scopesEnd: + - comment.line.double-slash +- source: throw + scopes: + - keyword.control.throw +- source: do_make_parser_error + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: reader +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: ' tlen ' +- source: + + scopes: + - keyword.operator +- source: ' xcnt' +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: Parser_Error + scopes: + - entity.name.scope-resolution +- source: '::' + scopes: + - punctuation.separator.namespace.access + - punctuation.separator.scope-resolution +- source: code_escape_utf_code_point_invalid +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' Encode it.' + scopesEnd: + - comment.line.double-slash +- source: auto + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: ' encode_one ' +- source: = + scopes: + - keyword.operator.assignment +- source: '[' + scopes: + - punctuation.definition.capture.begin.lambda +- source: '&' + scopes: + - meta.lambda.capture + - keyword.operator +- source: ']' + scopes: + - punctuation.definition.capture.end.lambda +- source: ( + scopesBegin: + - meta.function.definition.parameters.lambda + scopes: + - punctuation.definition.parameters.begin.lambda +- source: unsigned + scopesBegin: + - meta.parameter + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: shift + scopes: + - variable.parameter +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: unsigned + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: mask + scopes: + - variable.parameter + scopesEnd: + - meta.parameter +- source: ) + scopes: + - punctuation.definition.parameters.end.lambda + scopesEnd: + - meta.function.definition.parameters.lambda +- source: '{' + scopesBegin: + - meta.function.definition.body.lambda + scopes: + - punctuation.section.block.begin.bracket.curly.lambda +- source: value + scopes: + - variable.other.object.access +- source: . + scopes: + - punctuation.separator.dot-access +- source: push_back + scopes: + - entity.name.function.member +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.member +- source: static_cast + scopes: + - keyword.operator.wordlike + - keyword.operator.cast.static_cast +- source: < + scopes: + - keyword.operator.comparison +- source: char + scopes: + - storage.type.primitive + - storage.type.built-in.primitive +- source: '>' + scopes: + - keyword.operator.comparison +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: '~' + scopes: + - keyword.operator +- source: 'mask ' +- source: '<<' + scopes: + - keyword.operator.bitwise.shift +- source: '1' + scopes: + - constant.numeric.decimal +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '|' + scopes: + - keyword.operator +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'cpnt ' +- source: '>>' + scopes: + - keyword.operator.bitwise.shift +- source: ' shift' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '&' + scopes: + - keyword.operator +- source: ' mask' +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.member +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.lambda + scopesEnd: + - meta.function.definition.body.lambda +- source: ; + scopes: + - punctuation.terminator.statement +- source: if + scopes: + - keyword.control.if +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'cpnt ' +- source: < + scopes: + - keyword.operator.comparison +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '80' + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '0' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: FF + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: if + scopes: + - keyword.control.if +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'cpnt ' +- source: < + scopes: + - keyword.operator.comparison +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '800' + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '6' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 1F + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '0' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 3F + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: if + scopes: + - keyword.control.if +- source: ( + scopesBegin: + - meta.parens + scopes: + - punctuation.section.parens.begin.bracket.round +- source: 'cpnt ' +- source: < + scopes: + - keyword.operator.comparison +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '10000' + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.parens.end.bracket.round + scopesEnd: + - meta.parens +- source: '{' + scopesBegin: + - meta.block + scopes: + - punctuation.section.block.begin.bracket.curly +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '12' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 0F + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '6' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 3F + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '0' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 3F + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '18' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: '07' + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '12' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 3F + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '6' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 3F + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: encode_one + scopes: + - entity.name.function.call +- source: ( + scopes: + - punctuation.section.arguments.begin.bracket.round.function.call +- source: '0' + scopes: + - constant.numeric.decimal +- source: ',' + scopes: + - comma + - punctuation.separator.delimiter +- source: 0x + scopes: + - keyword.other.unit.hexadecimal +- source: 3F + scopes: + - constant.numeric.hexadecimal +- source: ) + scopes: + - punctuation.section.arguments.end.bracket.round.function.call +- source: ; + scopes: + - punctuation.terminator.statement +- source: break + scopes: + - keyword.control.break +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: default + scopes: + - keyword.control.default +- source: ':' +- source: ' thing' +- source: ; + scopes: + - punctuation.terminator.statement +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly + scopesEnd: + - meta.block +- source: void + scopesBegin: + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: func1 + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round + scopesEnd: + - meta.function.definition + - meta.head.function.definition +- source: ; + scopes: + - punctuation.terminator.statement +- source: '[[' + scopesBegin: + - meta.function.definition + - meta.qualified_type + - support.other.attribute + scopes: + - punctuation.section.attribute.begin +- source: noreturn + scopes: + - entity.other.attribute.noreturn +- source: ']]' + scopes: + - punctuation.section.attribute.end + scopesEnd: + - support.other.attribute +- source: void + scopes: + - storage.type.primitive + - storage.type.built-in.primitive + scopesEnd: + - meta.qualified_type +- source: func2 + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: /* + scopesBegin: + - meta.function.definition.parameters + - comment.block + scopes: + - punctuation.definition.comment.begin +- source: syntax highlighting +- source: '*/' + scopes: + - punctuation.definition.comment.end + scopesEnd: + - meta.function.definition.parameters + - comment.block +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round + scopesEnd: + - meta.function.definition + - meta.head.function.definition +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' no syntax highlighting' + scopesEnd: + - comment.line.double-slash +- source: struct + scopesBegin: + - meta.block.struct + - meta.head.struct + scopes: + - storage.type.struct +- source: st + scopes: + - entity.name.type.struct +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.struct + scopesEnd: + - meta.head.struct +- source: // + scopesBegin: + - meta.body.struct + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' syntax highlighting works now' + scopesEnd: + - comment.line.double-slash +- source: '}' + scopes: + - punctuation.section.block.end.bracket.curly.struct + scopesEnd: + - meta.body.struct +- source: ; + scopes: + - punctuation.terminator.statement + scopesEnd: + - meta.block.struct +- source: void + scopesBegin: + - meta.function.definition + scopes: + - meta.qualified_type + - storage.type.primitive + - storage.type.built-in.primitive +- source: func3 + scopesBegin: + - meta.head.function.definition + scopes: + - entity.name.function.definition +- source: ( + scopes: + - punctuation.section.parameters.begin.bracket.round +- source: ) + scopes: + - punctuation.section.parameters.end.bracket.round + scopesEnd: + - meta.function.definition + - meta.head.function.definition +- source: ; + scopes: + - punctuation.terminator.statement +- source: // + scopesBegin: + - comment.line.double-slash + scopes: + - punctuation.definition.comment +- source: ' Universal character name' + scopesEnd: + - comment.line.double-slash +- source: class + scopesBegin: + - meta.block.class + - meta.head.class + scopes: + - storage.type.class +- source: LineReader + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: Line_Reader + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: Line\u00b7Reader + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement +- source: class + scopesBegin: + - meta.head.class + scopes: + - storage.type.class +- source: Line\U0002070EReader + scopes: + - entity.name.type.class +- source: '{' + scopes: + - punctuation.section.block.begin.bracket.curly.class + scopesEnd: + - meta.head.class +- source: '}' + scopes: + - meta.body.class + - punctuation.section.block.end.bracket.curly.class +- source: ; + scopes: + - punctuation.terminator.statement diff --git a/test/specs/vscode/misc001.cpp.yaml b/test/specs/vscode/misc001.cpp.yaml index ed0794a2..41968083 100644 --- a/test/specs/vscode/misc001.cpp.yaml +++ b/test/specs/vscode/misc001.cpp.yaml @@ -129,7 +129,7 @@ - punctuation.section.arguments.begin.bracket.round.function.call - source: const scopes: - - storage.modifier.specifier.const + - storage.modifier.specifier.$5 - source: ' Rule ' - source: '&' scopes: @@ -138,7 +138,7 @@ - source: ) scopes: - punctuation.section.arguments.end.bracket.round.function.call -- source: ' : ' +- source: ' :' - source: blank_ scopes: - entity.name.function.call @@ -188,7 +188,7 @@ - meta.block - source: static scopes: - - storage.modifier.specifier.static + - storage.modifier.specifier.$5 - source: void scopesBegin: - meta.function.definition @@ -204,17 +204,21 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round -- source: 'Rule ' +- source: Rule scopesBegin: - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter - source: '*' scopes: - - keyword.operator + - storage.modifier.pointer - source: rule scopes: - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -339,15 +343,21 @@ scopes: - punctuation.section.parameters.begin.bracket.round.operator-overload - source: const + scopesBegin: + - meta.parameter scopes: - storage.modifier.specifier.const -- source: ' Rule ' +- source: Rule + scopes: + - entity.name.type.parameter - source: '&' scopes: - - keyword.operator + - storage.modifier.reference - source: other scopes: - variable.parameter + scopesEnd: + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round.operator-overload @@ -427,7 +437,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: @@ -485,7 +494,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ( scopesBegin: diff --git a/test/specs/vscode/test.cc.yaml b/test/specs/vscode/test.cc.yaml index 055e09c7..73993ab9 100644 --- a/test/specs/vscode/test.cc.yaml +++ b/test/specs/vscode/test.cc.yaml @@ -191,14 +191,18 @@ - source: ( scopes: - punctuation.section.parameters.begin.bracket.round -- source: 'O ' +- source: O scopesBegin: - meta.function.definition.parameters + - meta.parameter + scopes: + - entity.name.type.parameter - source: obj scopes: - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -321,7 +325,6 @@ - source: new scopes: - keyword.operator.wordlike - - memory - keyword.operator.new - source: ' O' - source: ) @@ -371,9 +374,7 @@ scopes: - comma - punctuation.separator.delimiter -- source: ... - scopes: - - punctuation.vararg-ellipses +- source: ' ...' - source: ) scopes: - punctuation.section.arguments.end.bracket.round.function.call @@ -440,37 +441,31 @@ scopesEnd: - comment.line.double-slash - source: asm + scopesBegin: + - meta.asm scopes: - storage.type.asm - source: ( - scopesBegin: - - meta.parens scopes: - - punctuation.section.parens.begin.bracket.round + - punctuation.section.parens.begin.bracket.round.assembly - source: '"' scopesBegin: - string.quoted.double scopes: - - punctuation.definition.string.begin -- source: 'movw $0x38, ' -- source: '%a' + - punctuation.definition.string.begin.assembly +- source: 'movw $0x38, %ax; ltr %ax' scopes: - - constant.other.placeholder -- source: 'x; ltr ' -- source: '%a' - scopes: - - constant.other.placeholder -- source: x + - meta.embedded.assembly - source: '"' scopes: - - punctuation.definition.string.end + - punctuation.definition.string.end.assembly scopesEnd: - string.quoted.double - source: ) scopes: - - punctuation.section.parens.end.bracket.round + - punctuation.section.parens.end.bracket.round.assembly scopesEnd: - - meta.parens + - meta.asm - source: ; scopes: - punctuation.terminator.statement diff --git a/test/specs/vscode/test.cpp.yaml b/test/specs/vscode/test.cpp.yaml index 93b74610..7f93f7cc 100644 --- a/test/specs/vscode/test.cpp.yaml +++ b/test/specs/vscode/test.cpp.yaml @@ -80,6 +80,7 @@ - source: ':' scopes: - colon + - punctuation.separator.delimiter.colon.access.control scopesEnd: - storage.type.modifier.access.control.public - source: void @@ -100,6 +101,7 @@ - source: int scopesBegin: - meta.function.definition.parameters + - meta.parameter scopes: - storage.type.primitive - storage.type.built-in.primitive @@ -113,6 +115,7 @@ - storage.type.built-in.primitive scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round @@ -199,6 +202,7 @@ - source: int scopesBegin: - meta.function.definition.parameters + - meta.parameter scopes: - storage.type.primitive - storage.type.built-in.primitive @@ -218,6 +222,7 @@ - variable.parameter scopesEnd: - meta.function.definition.parameters + - meta.parameter - source: ) scopes: - punctuation.section.parameters.end.bracket.round