oak_jasmin/language/
mod.rs1use oak_core::{Language, LanguageCategory};
2
3#[derive(Debug, Default, Copy, Clone)]
5pub struct JasminLanguage {
6 pub extended: bool,
8 pub comments: bool,
10}
11
12impl JasminLanguage {
13 pub fn new() -> Self {
14 Self::default()
15 }
16
17 pub fn standard() -> Self {
18 Self { extended: true, comments: true }
19 }
20
21 pub fn minimal() -> Self {
22 Self { extended: false, comments: false }
23 }
24}
25
26impl Language for JasminLanguage {
27 const NAME: &'static str = "jasmin";
28 const CATEGORY: LanguageCategory = LanguageCategory::Programming;
29
30 type TokenType = crate::kind::JasminSyntaxKind;
31 type ElementType = crate::kind::JasminSyntaxKind;
32 type TypedRoot = crate::ast::JasminRoot;
33}