mod html;
mod json;
mod sql;
pub use html::html;
pub use json::json;
pub use sql::sql;
use tree_sitter::Language as TsLanguage;
#[derive(Debug)]
pub enum LanguageError {
HighlightConfig(String),
}
impl std::fmt::Display for LanguageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
LanguageError::HighlightConfig(msg) => write!(f, "Highlight config error: {}", msg),
}
}
}
impl std::error::Error for LanguageError {}
pub struct Language {
pub name: &'static str,
pub ts_language: TsLanguage,
pub highlights_query: &'static str,
pub injections_query: &'static str,
pub locals_query: &'static str,
}