chappi-core 0.1.0

Typed cognitive graph, patch, reentry, projection, and measurement engine for Chappi
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use chappi_syntax::{Diagnostic, Severity, Span};

pub(crate) fn error(
    code: &str,
    span: Span,
    semantic_path: Vec<String>,
    message: impl Into<String>,
    hint: Option<String>,
) -> Diagnostic {
    Diagnostic {
        code: code.to_owned(),
        severity: Severity::Error,
        span,
        semantic_path,
        message: message.into(),
        hint,
    }
}