1#[doc = include_str!("../readme.md")]
2use crate::{ast::AdaRoot, lexer::AdaTokenType, parser::AdaElementType};
3use oak_core::{Language, LanguageCategory};
4use serde::{Deserialize, Serialize};
5
6#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
8pub struct AdaLanguage {
9 pub allow_ada_2022: bool,
11 pub strict_mode: bool,
13}
14
15impl AdaLanguage {
16 pub fn new() -> Self {
18 Self { allow_ada_2022: true, strict_mode: false }
19 }
20}
21
22impl Default for AdaLanguage {
23 fn default() -> Self {
24 Self::new()
25 }
26}
27
28impl Language for AdaLanguage {
29 const NAME: &'static str = "ada";
30 const CATEGORY: LanguageCategory = LanguageCategory::Programming;
31
32 type TokenType = AdaTokenType;
33 type ElementType = AdaElementType;
34 type TypedRoot = AdaRoot;
35}