Skip to main content

oak_rust/
lib.rs

1#![doc = include_str!("readme.md")]
2#![feature(new_range_api)]
3#![feature(portable_simd)]
4#![warn(missing_docs)]
5#![doc(html_logo_url = "https://raw.githubusercontent.com/ygg-lang/oaks/refs/heads/dev/documents/logo.svg")]
6#![doc(html_favicon_url = "https://raw.githubusercontent.com/ygg-lang/oaks/refs/heads/dev/documents/logo.svg")]
7//! Rust support for the Oak language framework.
8
9/// AST module.
10pub mod ast;
11/// Builder module.
12pub mod builder;
13
14/// Language configuration module.
15pub mod language;
16/// Lexer module.
17pub mod lexer;
18#[cfg(any(feature = "lsp", feature = "oak-highlight", feature = "oak-pretty-print"))]
19pub mod lsp;
20/// MCP module.
21#[cfg(feature = "mcp")]
22pub mod mcp;
23
24/// Parser module.
25pub mod parser;
26
27pub use crate::{ast::RustRoot, builder::RustBuilder, language::RustLanguage, lexer::RustLexer, parser::RustParser};
28pub use lexer::token_type::RustTokenType;
29pub use parser::RustElementType;
30
31#[cfg(feature = "oak-highlight")]
32pub use crate::lsp::highlighter::{Highlighter, RustHighlighter};
33
34#[cfg(feature = "lsp")]
35pub use crate::lsp::RustLanguageService;
36
37#[cfg(feature = "oak-pretty-print")]
38pub use crate::lsp::formatter::RustFormatter;