6 releases
Uses new Rust 2024
| 0.0.11 | Mar 30, 2026 |
|---|---|
| 0.0.10 | Mar 24, 2026 |
#216 in Parser tooling
425KB
7K
SLoC
oak-rst
High-performance incremental reStructuredText parser for the oak ecosystem.
Features
- Incremental parsing for efficient editing
- Support for core reStructuredText syntax
- Extensible architecture
- Integration with the oak ecosystem
Usage
use oak_rst::{RstLanguage, RstParser};
let language = RstLanguage::default();
let parser = RstParser::new(&language);
// Parse reStructuredText content
let content = "Hello World\n==========\n\nThis is a paragraph.";
let parse_result = parser.parse(content, &[], &mut ());
// Access the parsed AST
let root = parse_result.unwrap();
Supported Syntax
- Headings
- Paragraphs
- Lists (bullet points)
- Tables
- Code blocks
- Comments
- Directives
- Emphasis and strong text
- Literal text
- Links and references
Configuration
The RstLanguage struct allows you to configure various aspects of the parser:
allow_directives: Enable/disable directivesallow_substitutions: Enable/disable substitutionsallow_roles: Enable/disable rolesallow_footnotes: Enable/disable footnotesallow_citations: Enable/disable citationsallow_admonitions: Enable/disable admonitions
License
This project is licensed under the MIT License.
Dependencies
~6–11MB
~120K SLoC