liaise 0.1.1

diagnostic error propagation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use alloc::string::String;

pub trait DiagnosticLoc: Clone {
    fn source_display(&self) -> String;
}

// A simple default for CLI/Basic apps
#[derive(Debug, Clone)]
pub struct LineLoc {
    pub file: &'static str,
    pub line: u32,
}

impl DiagnosticLoc for LineLoc {
    fn source_display(&self) -> String {
        alloc::format!("{}:{}", self.file, self.line)
    }
}