1use crate::kind::MsilSyntaxKind;
2use oak_core::language::Language;
3
4#[derive(Debug, Clone, Copy, PartialEq, Eq)]
6pub struct MsilLanguage {
7 pub extended_instructions: bool,
9 pub debug_info: bool,
11 pub strict_mode: bool,
13}
14
15impl MsilLanguage {
16 pub fn new() -> Self {
18 Self::default()
19 }
20
21 pub fn standard() -> Self {
23 Self { extended_instructions: false, debug_info: false, strict_mode: true }
24 }
25
26 pub fn extended() -> Self {
28 Self { extended_instructions: true, debug_info: true, strict_mode: false }
29 }
30}
31
32impl Default for MsilLanguage {
33 fn default() -> Self {
34 Self { extended_instructions: false, debug_info: false, strict_mode: false }
35 }
36}
37
38impl Language for MsilLanguage {
39 type SyntaxKind = MsilSyntaxKind;
40 type TypedRoot = ();
41}