{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "stack": "cpp",
  "description": "C and C++ code-graph rules. Classes, structs, unions and enums are the symbols; functions and methods come from the call analysis, which blanks preprocessor lines first. A forward declaration (`class Foo;`) defines nothing.",
  "comments": {
    "line": ["//"],
    "block": [["/*", "*/"]],
    "string": ["\""],
    "dialect": "cpp"
  },
  "importSpecifiersAreStrings": true,
  "definitionPatterns": [
    {
      "id": "enum",
      "kind": "enum",
      "regex": "\\benum\\s+(?:class\\s+|struct\\s+)?([A-Za-z_][A-Za-z0-9_]*)\\s*(?::[^;{]*)?\\{"
    },
    {
      "id": "class",
      "kind": "class",
      "regex": "\\bclass\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*(?:final\\s*)?(?::[^;{]*)?\\{"
    },
    {
      "id": "struct",
      "kind": "struct",
      "regex": "\\bstruct\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*(?:final\\s*)?(?::[^;{]*)?\\{"
    },
    {
      "id": "union",
      "kind": "union",
      "regex": "\\bunion\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*\\{"
    }
  ],
  "importPatterns": [
    {
      "id": "include",
      "regex": "^\\s*#\\s*include\\s*[<\"](?:[A-Za-z0-9_.+-]+/)*([A-Za-z0-9_+-]+)(?:\\.[A-Za-z]+)?[>\"]"
    }
  ],
  "referenceKinds": ["class", "struct", "union", "enum"],
  "supertypes": {
    "syntax": "colon",
    "kinds": ["class", "struct"]
  },
  "ignoredIdentifiers": [
    "this",
    "class",
    "struct",
    "union",
    "enum",
    "namespace",
    "using",
    "typedef",
    "template",
    "typename",
    "public",
    "private",
    "protected",
    "virtual",
    "static",
    "inline",
    "const",
    "constexpr",
    "override",
    "final",
    "void",
    "int",
    "char",
    "bool",
    "float",
    "double",
    "long",
    "short",
    "unsigned",
    "signed",
    "auto",
    "new",
    "delete",
    "return",
    "if",
    "else",
    "for",
    "while",
    "switch",
    "case",
    "default",
    "try",
    "catch",
    "throw",
    "nullptr",
    "NULL",
    "true",
    "false",
    "std",
    "string",
    "vector",
    "map"
  ]
}
