oak_dot/language/
mod.rs

1use crate::{ast::DotRoot, kind::DotSyntaxKind};
2use oak_core::Language;
3
4/// DOT 语言配置(Graphviz)
5#[derive(Debug, Clone, Copy)]
6pub struct DotLanguage {
7    /// 是否启用严格模式
8    pub strict_mode: bool,
9    /// 是否允许有向图
10    pub allow_digraph: bool,
11}
12
13impl Default for DotLanguage {
14    fn default() -> Self {
15        Self { strict_mode: false, allow_digraph: true }
16    }
17}
18
19impl Language for DotLanguage {
20    type SyntaxKind = DotSyntaxKind;
21    type TypedRoot = DotRoot;
22}