--- name: C++ fileTypes: - cc - cpp - cp - cxx - c++ - C - h - hh - hpp - h++ firstLineMatch: -\*- C\+\+ -\*- scopeName: source.c++ uuid: 26251B18-6B1D-11D9-AFDB-000D93589AF6 foldingStartMarker: "(?x)\n\ \t\t /\\*\\*(?!\\*)\n\ \t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\ \t" patterns: - include: source.c - name: storage.modifier.c++ match: \b(friend|explicit|private|protected|public|virtual)\b - name: keyword.control.c++ match: \b(catch|namespace|operator|try|throw|using)\b - name: keyword.control.c++ match: \bdelete\b(\s*\[\])?|\bnew\b(?!]) - name: variable.other.readwrite.member.c++ match: \b(f|m)[A-Z]\w*\b comment: common C++ instance var naming idiom -- fMemberName - name: variable.language.c++ match: \b(this)\b - name: storage.type.template.c++ match: \btemplate\b\s* - name: keyword.operator.cast.c++ match: \b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\b\s* - name: keyword.operator.c++ match: \b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\b - name: storage.type.c++ match: \b(class|wchar_t)\b - name: storage.modifier.c++ match: \b(export|mutable|typename)\b - name: meta.function.destructor.c++ endCaptures: "0": name: punctuation.definition.parameters.c begin: "(?x)\n\ \t\t\t\t(?: ^ # begin-of-line\n\ \t\t\t\t | (?: (? [^()]++ | \\( \\g*+ \\) )*+ # function arguments\n\ \t\t\t\t \\) # match \")\"\n\ \t\t\t\t (\\s* : (? \\s* [A-Za-z_][A-Za-z0-9_]* \\( \\g*+ \\) ) (, \\g)* (, (?=\\s*\\n))? )? \\s* # optional base constructors\n\ \t\t\t\t (\\{|\\n)) # start bracket or end-of-line\n\ \t\t\t" beginCaptures: "1": name: entity.name.function.c "2": name: punctuation.definition.parameters.c end: \) patterns: - include: $base foldingStopMarker: (?