Skip to main content

oak_coq/language/
mod.rs

1use crate::kind::CoqSyntaxKind;
2use oak_core::{Language, LanguageCategory};
3use serde::{Deserialize, Serialize};
4
5/// Implementation of the Coq language for the OAK parsing framework.
6#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
7pub struct CoqLanguage {}
8
9impl CoqLanguage {
10    /// Creates a new CoqLanguage.
11    pub fn new() -> Self {
12        Self {}
13    }
14}
15
16impl Language for CoqLanguage {
17    const NAME: &'static str = "coq";
18    const CATEGORY: LanguageCategory = LanguageCategory::Programming;
19
20    type TokenType = CoqSyntaxKind;
21    type ElementType = CoqSyntaxKind;
22    type TypedRoot = crate::ast::CoqRoot;
23}