acdc-parser 0.8.0

`AsciiDoc` parser using PEG grammars
Documentation
{
  "name": "document",
  "type": "block",
  "header": {
    "title": [
      {
        "name": "text",
        "type": "string",
        "value": "Main Document",
        "location": [
          {
            "line": 1,
            "col": 3
          },
          {
            "line": 1,
            "col": 15
          }
        ]
      }
    ],
    "location": [
      {
        "line": 1,
        "col": 1
      },
      {
        "line": 3,
        "col": 16
      }
    ]
  },
  "attributes": {
    "leveloffset": false
  },
  "blocks": [
    {
      "name": "section",
      "type": "block",
      "title": [
        {
          "name": "text",
          "type": "string",
          "value": "This Should Be Level 2",
          "location": [
            {
              "line": 5,
              "col": 4
            },
            {
              "line": 5,
              "col": 25
            }
          ]
        }
      ],
      "level": 2,
      "blocks": [
        {
          "name": "paragraph",
          "type": "block",
          "inlines": [
            {
              "name": "text",
              "type": "string",
              "value": "Because leveloffset is +1, this == heading becomes level 2.",
              "location": [
                {
                  "line": 7,
                  "col": 1
                },
                {
                  "line": 7,
                  "col": 59
                }
              ]
            }
          ],
          "location": [
            {
              "line": 7,
              "col": 1
            },
            {
              "line": 7,
              "col": 59
            }
          ]
        },
        {
          "name": "section",
          "type": "block",
          "title": [
            {
              "name": "text",
              "type": "string",
              "value": "This Should Be Level 3",
              "location": [
                {
                  "line": 9,
                  "col": 5
                },
                {
                  "line": 9,
                  "col": 26
                }
              ]
            }
          ],
          "level": 3,
          "blocks": [
            {
              "name": "paragraph",
              "type": "block",
              "inlines": [
                {
                  "name": "text",
                  "type": "string",
                  "value": "And this === heading becomes level 3.",
                  "location": [
                    {
                      "line": 11,
                      "col": 1
                    },
                    {
                      "line": 11,
                      "col": 37
                    }
                  ]
                }
              ],
              "location": [
                {
                  "line": 11,
                  "col": 1
                },
                {
                  "line": 11,
                  "col": 37
                }
              ]
            },
            {
              "name": "leveloffset",
              "type": "attribute",
              "value": false,
              "location": [
                {
                  "line": 13,
                  "col": 1
                },
                {
                  "line": 13,
                  "col": 15
                }
              ]
            }
          ],
          "location": [
            {
              "line": 9,
              "col": 1
            },
            {
              "line": 13,
              "col": 14
            }
          ]
        }
      ],
      "location": [
        {
          "line": 5,
          "col": 1
        },
        {
          "line": 13,
          "col": 14
        }
      ]
    },
    {
      "name": "section",
      "type": "block",
      "title": [
        {
          "name": "text",
          "type": "string",
          "value": "This Should Be Level 1 Again",
          "location": [
            {
              "line": 15,
              "col": 4
            },
            {
              "line": 15,
              "col": 31
            }
          ]
        }
      ],
      "level": 1,
      "blocks": [
        {
          "name": "paragraph",
          "type": "block",
          "inlines": [
            {
              "name": "text",
              "type": "string",
              "value": "After unsetting leveloffset, == is back to level 1.",
              "location": [
                {
                  "line": 17,
                  "col": 1
                },
                {
                  "line": 17,
                  "col": 51
                }
              ]
            }
          ],
          "location": [
            {
              "line": 17,
              "col": 1
            },
            {
              "line": 17,
              "col": 51
            }
          ]
        }
      ],
      "location": [
        {
          "line": 15,
          "col": 1
        },
        {
          "line": 17,
          "col": 51
        }
      ]
    }
  ],
  "location": [
    {
      "line": 1,
      "col": 1
    },
    {
      "line": 17,
      "col": 51
    }
  ]
}