Skip to main content

oak_html/language/
mod.rs

1use crate::kind::HtmlSyntaxKind;
2use oak_core::{Language, LanguageCategory};
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
6pub struct HtmlLanguage {}
7
8impl HtmlLanguage {
9    pub fn new() -> Self {
10        Self {}
11    }
12}
13
14impl Language for HtmlLanguage {
15    const NAME: &'static str = "html";
16    const CATEGORY: LanguageCategory = LanguageCategory::Markup;
17
18    type TokenType = HtmlSyntaxKind;
19    type ElementType = HtmlSyntaxKind;
20    type TypedRoot = crate::ast::HtmlDocument;
21}