rust-code-analysis 0.0.18

Tool to compute and export code metrics
Documentation
{
  "name": "ccomment",
  "rules": {
    "translation_unit": {
      "type": "REPEAT",
      "content": {
        "type": "SYMBOL",
        "name": "_top_level_item"
      }
    },
    "_top_level_item": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "string_literal"
        },
        {
          "type": "SYMBOL",
          "name": "char_literal"
        },
        {
          "type": "SYMBOL",
          "name": "raw_string_literal"
        },
        {
          "type": "SYMBOL",
          "name": "comment"
        },
        {
          "type": "SYMBOL",
          "name": "nothing"
        },
        {
          "type": "SYMBOL",
          "name": "define"
        }
      ]
    },
    "nothing": {
      "type": "TOKEN",
      "content": {
        "type": "CHOICE",
        "members": [
          {
            "type": "PATTERN",
            "value": "[^R\"'\\/#]+"
          },
          {
            "type": "STRING",
            "value": "R"
          },
          {
            "type": "STRING",
            "value": "#"
          }
        ]
      }
    },
    "preproc_continuation_line": {
      "type": "TOKEN",
      "content": {
        "type": "PATTERN",
        "value": ".*\\\\\\r?\\n"
      }
    },
    "preproc_line": {
      "type": "TOKEN",
      "content": {
        "type": "PATTERN",
        "value": ".*\\n"
      }
    },
    "define": {
      "type": "SEQ",
      "members": [
        {
          "type": "PATTERN",
          "value": "#[ \\t]*define[ \\t]+"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "preproc_continuation_line"
          }
        },
        {
          "type": "SYMBOL",
          "name": "preproc_line"
        }
      ]
    },
    "string_literal": {
      "type": "SEQ",
      "members": [
        {
          "type": "PATTERN",
          "value": "\"([^\\\\\"]|\\\\(.|\\n))*\""
        }
      ]
    },
    "char_literal": {
      "type": "SEQ",
      "members": [
        {
          "type": "PATTERN",
          "value": "'([^\\\\']|\\\\(.|\\n))*'"
        }
      ]
    },
    "comment": {
      "type": "TOKEN",
      "content": {
        "type": "CHOICE",
        "members": [
          {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "//"
              },
              {
                "type": "PATTERN",
                "value": "(\\\\(.|\\r?\\n)|[^\\\\\\n])*"
              }
            ]
          },
          {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "/*"
              },
              {
                "type": "PATTERN",
                "value": "[^*]*\\*+([^\\/*][^*]*\\*+)*"
              },
              {
                "type": "STRING",
                "value": "/"
              }
            ]
          }
        ]
      }
    }
  },
  "extras": [
    {
      "type": "PATTERN",
      "value": "\\s"
    }
  ],
  "conflicts": [],
  "externals": [
    {
      "type": "SYMBOL",
      "name": "raw_string_literal"
    }
  ],
  "inline": [],
  "supertypes": []
}