oak_fortran/language/
mod.rs1use oak_core::{Language, LanguageCategory};
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
6pub struct FortranLanguage {
7 pub fortran_2008: bool,
9 pub fortran_2018: bool,
11 pub fixed_format: bool,
13 pub openmp: bool,
15 pub coarray: bool,
17}
18
19impl FortranLanguage {
20 pub fn new() -> Self {
22 Self::default()
23 }
24}
25
26impl Default for FortranLanguage {
27 fn default() -> Self {
28 Self { fortran_2008: true, fortran_2018: false, fixed_format: false, openmp: false, coarray: false }
29 }
30}
31
32impl Language for FortranLanguage {
33 const NAME: &'static str = "fortran";
34 const CATEGORY: LanguageCategory = LanguageCategory::Programming;
35
36 type TokenType = crate::kind::FortranSyntaxKind;
37 type ElementType = crate::kind::FortranSyntaxKind;
38 type TypedRoot = ();
39}