Skip to main content

oak_highlight/
lib.rs

1#![feature(new_range_api)]
2#![recursion_limit = "512"]
3#![doc = include_str!("readme.md")]
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#![warn(missing_docs)]
7//! Syntax highlighting for the Oak language framework.
8//!
9//! This crate provides a flexible syntax highlighting system with support
10//! for various exporters (HTML, ANSI, JSON, etc.) and themes.
11
12/// Exporters for converting highlighted segments to different formats.
13pub mod exporters;
14/// Core highlighting logic and structures.
15pub mod highlighter;
16/// Predefined themes and theme loading logic.
17pub mod themes;
18
19pub use crate::{
20    exporters::{AnsiExporter, CssExporter, ExportFormat, Exporter, HtmlExporter, JsonExporter},
21    highlighter::{HighlightResult, HighlightSegment, HighlightStyle, HighlightTheme, Highlighter, OakHighlighter},
22    themes::Theme,
23};