oak-asciidoc
High-performance incremental AsciiDoc parser for the oak ecosystem.
Features
- Incremental parsing for efficient editing
- Support for core AsciiDoc syntax
- Extensible architecture
- Integration with the oak ecosystem
Usage
use ;
let language = default;
let parser = new;
// Parse AsciiDoc content
let content = "= Hello World\n\nThis is a paragraph.\n\n- List item 1\n- List item 2";
let parse_result = parser.parse;
// Access the parsed AST
let root = parse_result.unwrap;
Supported Syntax
- Headings
- Paragraphs
- Lists
- Tables
- Code blocks
- Comments
- Blocks
- Macros
- Attributes
- Cross-references
- Footnotes
- Emphasis and strong text
- Monospace text
- Links and images
Configuration
The AsciidocLanguage struct allows you to configure various aspects of the parser:
allow_macros: Enable/disable macrosallow_attributes: Enable/disable attributesallow_blocks: Enable/disable blocksallow_footnotes: Enable/disable footnotesallow_cross_references: Enable/disable cross-referencesallow_includes: Enable/disable include directives
License
This project is licensed under the MIT License.