oak_valkyrie/language/
mod.rs1use crate::{ast::ValkyrieRoot, kind::ValkyrieSyntaxKind};
2use oak_core::{Language, LanguageCategory};
3use serde::{Deserialize, Serialize};
4
5#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
6pub struct ValkyrieLanguage {
8 pub allow_xml: bool,
10 pub allow_template: bool,
12}
13
14impl Default for ValkyrieLanguage {
15 fn default() -> Self {
16 Self { allow_xml: false, allow_template: false }
17 }
18}
19
20impl Language for ValkyrieLanguage {
21 const NAME: &'static str = "valkyrie";
22 const CATEGORY: LanguageCategory = LanguageCategory::Programming;
23
24 type TokenType = ValkyrieSyntaxKind;
25 type ElementType = ValkyrieSyntaxKind;
26 type TypedRoot = ValkyrieRoot;
27}