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