acdc-parser 0.8.0

`AsciiDoc` parser using PEG grammars
Documentation
{
  "name": "document",
  "type": "block",
  "header": {
    "title": [
      {
        "name": "text",
        "type": "string",
        "value": "Document with Mixed Comments",
        "location": [
          {
            "line": 1,
            "col": 3
          },
          {
            "line": 1,
            "col": 30
          }
        ]
      }
    ],
    "location": [
      {
        "line": 1,
        "col": 1
      },
      {
        "line": 3,
        "col": 50
      }
    ]
  },
  "attributes": {},
  "blocks": [
    {
      "name": "paragraph",
      "type": "block",
      "inlines": [
        {
          "name": "text",
          "type": "string",
          "value": "Regular paragraph.",
          "location": [
            {
              "line": 5,
              "col": 1
            },
            {
              "line": 5,
              "col": 18
            }
          ]
        }
      ],
      "location": [
        {
          "line": 5,
          "col": 1
        },
        {
          "line": 5,
          "col": 18
        }
      ]
    },
    {
      "name": "comment",
      "type": "block",
      "content": " Another comment to filter",
      "location": [
        {
          "line": 7,
          "col": 1
        },
        {
          "line": 7,
          "col": 29
        }
      ]
    },
    {
      "name": "listing",
      "type": "block",
      "form": "delimited",
      "delimiter": "----",
      "inlines": [
        {
          "name": "text",
          "type": "string",
          "value": "code line 1\n// This comment should be PRESERVED (inside block)\ncode line 2",
          "location": [
            {
              "line": 11,
              "col": 1
            },
            {
              "line": 13,
              "col": 11
            }
          ]
        }
      ],
      "title": [
        {
          "name": "text",
          "type": "string",
          "value": "Code block",
          "location": [
            {
              "line": 9,
              "col": 2
            },
            {
              "line": 9,
              "col": 11
            }
          ]
        }
      ],
      "location": [
        {
          "line": 9,
          "col": 1
        },
        {
          "line": 14,
          "col": 4
        }
      ]
    },
    {
      "name": "comment",
      "type": "block",
      "content": " This comment should be FILTERED (between blocks)",
      "location": [
        {
          "line": 16,
          "col": 1
        },
        {
          "line": 16,
          "col": 52
        }
      ]
    },
    {
      "name": "paragraph",
      "type": "block",
      "inlines": [
        {
          "name": "text",
          "type": "string",
          "value": "Another paragraph.",
          "location": [
            {
              "line": 18,
              "col": 1
            },
            {
              "line": 18,
              "col": 18
            }
          ]
        }
      ],
      "location": [
        {
          "line": 18,
          "col": 1
        },
        {
          "line": 18,
          "col": 18
        }
      ]
    },
    {
      "name": "literal",
      "type": "block",
      "form": "delimited",
      "delimiter": "....",
      "inlines": [
        {
          "name": "text",
          "type": "string",
          "value": "literal line 1\n// This comment should be PRESERVED (inside literal)\nliteral line 2",
          "location": [
            {
              "line": 21,
              "col": 1
            },
            {
              "line": 23,
              "col": 14
            }
          ]
        }
      ],
      "location": [
        {
          "line": 20,
          "col": 1
        },
        {
          "line": 24,
          "col": 4
        }
      ]
    },
    {
      "name": "comment",
      "type": "block",
      "content": " Final comment to filter (outside all blocks)",
      "location": [
        {
          "line": 26,
          "col": 1
        },
        {
          "line": 26,
          "col": 48
        }
      ]
    }
  ],
  "location": [
    {
      "line": 1,
      "col": 1
    },
    {
      "line": 26,
      "col": 47
    }
  ]
}