blob: 6bd922bc6c5e2ae959bc1eabbd94495f3ba14243 (
plain) (
tree)
|
|
#[derive(Debug)]
pub enum ErrorKind {
UnexpectedChar(char),
UnterminatedString,
UnmatchedParens,
}
#[derive(Debug)]
pub struct Error {
pub line: usize,
pub kind: ErrorKind,
}
pub fn report(err: &Error) {
eprintln!("[line {}] Error: {:?}", err.line, err.kind);
}
|