Skip to main content

oak_zig/language/
mod.rs

1#![doc = include_str!("readme.md")]
2use oak_core::{Language, LanguageCategory};
3
4/// Zig language configuration.
5#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
6#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
7pub struct ZigLanguage {}
8
9impl ZigLanguage {
10    /// Creates a new Zig language configuration.
11    pub fn new() -> Self {
12        Self {}
13    }
14}
15
16impl Language for ZigLanguage {
17    const NAME: &'static str = "zig";
18    const CATEGORY: LanguageCategory = LanguageCategory::Programming;
19
20    type TokenType = crate::lexer::token_type::ZigTokenType;
21    type ElementType = crate::parser::element_type::ZigElementType;
22    type TypedRoot = crate::ast::ZigRoot;
23}