oak_objective_c/language/
mod.rs1use crate::{ast::ObjectiveCRoot, kind::ObjectiveCLanguageSyntaxKind};
2use oak_core::Language;
3
4pub struct ObjectiveCLanguage {
5 pub arc_enabled: bool,
6 pub strict_mode: bool,
7}
8
9impl ObjectiveCLanguage {
10 pub fn new() -> Self {
11 Self { arc_enabled: true, strict_mode: false }
12 }
13
14 pub fn with_arc(mut self, enabled: bool) -> Self {
15 self.arc_enabled = enabled;
16 self
17 }
18
19 pub fn with_strict_mode(mut self, enabled: bool) -> Self {
20 self.strict_mode = enabled;
21 self
22 }
23}
24
25impl Default for ObjectiveCLanguage {
26 fn default() -> Self {
27 Self::new()
28 }
29}
30
31impl Language for ObjectiveCLanguage {
32 type SyntaxKind = ObjectiveCLanguageSyntaxKind;
33 type TypedRoot = ObjectiveCRoot;
34}