Skip to main content

oak_solidity/
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/// Language configuration module.
13pub mod language;
14/// Lexer module.
15pub mod lexer;
16/// LSP module.
17#[cfg(any(feature = "lsp", feature = "oak-highlight", feature = "oak-pretty-print"))]
18pub mod lsp;
19/// MCP module.
20#[cfg(feature = "mcp")]
21pub mod mcp;
22
23/// Parser module.
24pub mod parser;
25
26pub use crate::{ast::SolidityRoot, language::SolidityLanguage, lexer::SolidityLexer, parser::SolidityParser};
27
28pub use oak_core::{ElementType, TokenType};
29
30/// Highlighter implementation.
31#[cfg(feature = "oak-highlight")]
32pub use crate::lsp::highlighter::SolidityHighlighter;
33
34#[cfg(feature = "lsp")]
35pub use crate::lsp::SolidityLanguageService;
36/// LSP implementation.
37#[cfg(feature = "lsp")]
38pub use crate::lsp::formatter::SolidityFormatter;
39
40/// MCP service implementation.
41#[cfg(feature = "mcp")]
42pub use crate::mcp::serve_solidity_mcp;
43pub use lexer::token_type::SolidityTokenType;
44pub use parser::element_type::SolidityElementType;