Skip to main content

oak_java/
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//! Java support for the Oak language framework.
8
9/// AST module.
10pub mod ast;
11/// Builder module.
12pub mod builder;
13
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/// MCP module.
22#[cfg(feature = "mcp")]
23pub mod mcp;
24
25/// Parser module.
26pub mod parser;
27
28pub use crate::{ast::JavaRoot, builder::JavaBuilder, language::JavaLanguage, lexer::JavaLexer, parser::JavaParser};
29
30/// Highlighter implementation.
31#[cfg(feature = "oak-highlight")]
32pub use crate::lsp::highlighter::JavaHighlighter;
33
34/// LSP implementation.
35#[cfg(feature = "lsp")]
36pub use crate::lsp::JavaLanguageService;
37
38/// MCP service implementation.
39#[cfg(feature = "mcp")]
40pub use crate::mcp::serve_java_mcp;
41pub use lexer::token_type::JavaTokenType;
42pub use parser::element_type::JavaElementType;