Expand description
§oak-rst
High-performance incremental reStructuredText parser for the oak ecosystem.
§Features
- Incremental parsing of reStructuredText documents
- Support for directives, substitutions, roles, footnotes, and citations
- Extensible architecture for custom reStructuredText extensions
- Integration with the oak ecosystem for language services
§Usage
use oak_rst::{RstLexer, RstParser, RstLanguage};
use oak_core::{ParseSession, SourceText, Parser};
let code = "# Heading\n\nParagraph with *emphasis* and **strong** text.";
let language = RstLanguage::default();
let lexer = RstLexer::new(&language);
let parser = RstParser::new(&language);
// Parse the code
let source = SourceText::new(code);
let mut session = ParseSession::new(16);
let result = parser.parse(&source, &[], &mut session);§Features Flags
serde: Enables serialization/deserialization supportlsp: Enables Language Server Protocol supportmcp: Enables Multi-Compiler Protocol support
§License
This project is licensed under the MIT License - see the LICENSE file for details.
Re-exports§
pub use crate::ast::RstRoot;pub use crate::language::RstLanguage;pub use crate::lexer::RstLexer;pub use crate::parser::RstParser;