oak_delphi/language/
mod.rs1#![doc = include_str!("readme.md")]
2use crate::ast::DelphiRoot;
3use oak_core::{Language, LanguageCategory};
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
7#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
8pub struct DelphiLanguage {
9 pub strict_syntax: bool,
11 pub unicode_strings: bool,
13}
14
15impl DelphiLanguage {
16 pub fn new() -> Self {
18 Self::default()
19 }
20}
21
22impl Default for DelphiLanguage {
23 fn default() -> Self {
24 Self { strict_syntax: false, unicode_strings: true }
25 }
26}
27
28impl Language for DelphiLanguage {
29 const NAME: &'static str = "delphi";
30 const CATEGORY: LanguageCategory = LanguageCategory::Programming;
31
32 type TokenType = crate::lexer::token_type::DelphiTokenType;
33 type ElementType = crate::parser::element_type::DelphiElementType;
34 type TypedRoot = DelphiRoot;
35}