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
7/// AST module containing TeX syntax tree definitions.
8pub mod ast;
9/// Builder module for constructing TeX ASTs.
10pub mod builder;
11
12/// Language definition and configuration for TeX.
13pub mod language;
14/// Lexer implementation for TeX.
15pub mod lexer;
16/// LSP-related functionality (hover, completion, highlighting) for TeX.
17#[cfg(any(feature = "lsp", feature = "oak-highlight", feature = "oak-pretty-print"))]
18pub mod lsp;
19/// MCP (Model Context Protocol) integration for TeX.
20#[cfg(feature = "mcp")]
21pub mod mcp;
22
23/// Parser implementation for TeX.
24pub mod parser;
25
26pub use crate::{ast::TexRoot, builder::TexBuilder, language::TexLanguage, lexer::TexLexer, parser::TexParser};
27
28/// Highlighter implementation.
29#[cfg(feature = "oak-highlight")]
30pub use crate::lsp::highlighter::TexHighlighter;
31
32#[cfg(feature = "lsp")]
33pub use crate::lsp::TexLanguageService;
34/// LSP implementation.
35#[cfg(feature = "lsp")]
36pub use crate::lsp::formatter::TexFormatter;
37
38/// MCP service implementation.
39#[cfg(feature = "mcp")]
40pub use crate::mcp::serve_tex_mcp;
41pub use lexer::token_type::TexTokenType;
42pub use parser::element_type::TexElementType;