lsts 0.6.34

Large Scale Type Systems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::token::{Span};

pub struct Error {
   pub kind: String,
   pub rule: String,
   pub span: Span,
}

impl std::fmt::Debug for Error {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "\n{}, {}, in {} --> {},{}\n", self.kind, self.rule, self.span.filename,
               self.span.linecol_start.0, self.span.linecol_start.1)
    }
}