Skip to main content

oak_lua/
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// pub mod formatter;
13
14/// Type definitions module.
15/// Language configuration module.
16pub mod language;
17/// Lexer module.
18pub mod lexer;
19/// LSP module.
20#[cfg(any(feature = "lsp", feature = "oak-highlight", feature = "oak-pretty-print"))]
21pub mod lsp;
22/// MCP module.
23#[cfg(feature = "mcp")]
24pub mod mcp;
25
26/// Parser module.
27pub mod parser;
28
29pub use crate::{ast::LuaRoot, builder::LuaBuilder, language::LuaLanguage, lexer::LuaLexer, parser::LuaParser};
30
31/// Highlighter implementation.
32#[cfg(feature = "oak-highlight")]
33pub use crate::lsp::highlighter::LuaHighlighter;
34
35/// LSP implementation.
36#[cfg(feature = "lsp")]
37pub use crate::lsp::LuaLanguageService;
38// #[cfg(feature = "oak-pretty-print")]
39// pub use crate::lsp::formatter::LuaFormatter;
40
41/// MCP service implementation.
42#[cfg(feature = "mcp")]
43pub use crate::mcp::serve_lua_mcp;
44pub use lexer::token_type::LuaTokenType;
45pub use parser::element_type::LuaElementType;