1use crate::kind::DSyntaxKind;
2use oak_core::Language;
3
4#[derive(Debug, Clone)]
6pub struct DLanguage {
7 pub d2_features: bool,
9 pub inline_asm: bool,
11 pub contracts: bool,
13}
14
15impl DLanguage {
16 pub fn standard() -> Self {
18 Self { d2_features: true, inline_asm: true, contracts: true }
19 }
20
21 pub fn minimal() -> Self {
23 Self { d2_features: false, inline_asm: false, contracts: false }
24 }
25}
26
27impl Default for DLanguage {
28 fn default() -> Self {
29 Self { d2_features: true, inline_asm: false, contracts: true }
30 }
31}
32
33impl Language for DLanguage {
34 type SyntaxKind = DSyntaxKind;
35 type TypedRoot = ();
36}