Skip to main content

oak_lean/
lib.rs

1#![doc = include_str!("readme.md")]
2#![feature(new_range_api)]
3#![warn(missing_docs)]
4#![doc(html_logo_url = "https://raw.githubusercontent.com/ygg-lang/oaks/refs/heads/dev/documents/logo.svg")]
5#![doc(html_favicon_url = "https://raw.githubusercontent.com/ygg-lang/oaks/refs/heads/dev/documents/logo.svg")]
6
7/// AST module.
8pub mod ast;
9/// Builder module.
10pub mod builder;
11
12/// Type definitions module.
13/// Language configuration module.
14pub mod language;
15/// Lexer module.
16pub mod lexer;
17/// LSP module.
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::{
28    ast::LeanRoot,
29    builder::LeanBuilder,
30    language::LeanLanguage,
31    lexer::{LeanLexer, token_type::LeanTokenType},
32    parser::{LeanParser, element_type::LeanElementType},
33};
34
35// Highlighter implementation.
36#[cfg(feature = "oak-highlight")]
37pub use crate::lsp::highlighter::LeanHighlighter;
38
39// LSP implementation.
40#[cfg(feature = "lsp")]
41pub use crate::lsp::LeanLanguageService;
42
43// MCP service implementation.
44#[cfg(feature = "mcp")]
45pub use crate::mcp::serve_lean_mcp;