Skip to main content

oak_tex/
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//! Tex support for the Oak language framework.
7
8/// AST module.
9pub mod ast;
10/// Builder module.
11pub mod builder;
12
13/// Syntax kind module.
14/// Language configuration module.
15pub mod language;
16/// Lexer module.
17pub mod lexer;
18/// LSP module.
19#[cfg(any(feature = "lsp", feature = "oak-highlight", feature = "oak-pretty-print"))]
20pub mod lsp;
21#[cfg(feature = "mcp")]
22pub mod mcp;
23
24/// Parser module.
25pub mod parser;
26
27pub use crate::{ast::TexRoot, builder::TexBuilder, language::TexLanguage, lexer::TexLexer, parser::TexParser};
28
29/// Highlighter implementation.
30#[cfg(feature = "oak-highlight")]
31pub use crate::lsp::highlighter::TexHighlighter;
32
33#[cfg(feature = "lsp")]
34pub use crate::lsp::TexLanguageService;
35/// LSP implementation.
36#[cfg(feature = "lsp")]
37pub use crate::lsp::formatter::TexFormatter;
38
39/// MCP service implementation.
40#[cfg(feature = "mcp")]
41pub use crate::mcp::serve_tex_mcp;
42pub use lexer::token_type::TexTokenType;
43pub use parser::element_type::TexElementType;