Skip to main content

oak_ini/language/
mod.rs

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