oak_delphi/language/
mod.rs

1use crate::ast::DelphiRoot;
2use oak_core::{Language, LanguageCategory};
3use serde::{Deserialize, Serialize};
4
5/// Language definition for Delphi programming language
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct DelphiLanguage {
8    /// Whether to enable strict syntax checking
9    pub strict_syntax: bool,
10    /// Whether to support Unicode strings
11    pub unicode_strings: bool,
12}
13
14impl Default for DelphiLanguage {
15    fn default() -> Self {
16        Self { strict_syntax: false, unicode_strings: true }
17    }
18}
19
20impl Language for DelphiLanguage {
21    const NAME: &'static str = "delphi";
22    const CATEGORY: LanguageCategory = LanguageCategory::Programming;
23
24    type TokenType = crate::kind::DelphiSyntaxKind;
25    type ElementType = crate::kind::DelphiSyntaxKind;
26    type TypedRoot = DelphiRoot;
27}