ablescript/src/error.rs
2021-05-25 21:22:38 -05:00

19 lines
339 B
Rust

use std::ops::Range;
#[derive(Debug, Clone)]
pub struct Error {
pub kind: ErrorKind,
pub position: Range<usize>,
}
#[derive(Debug, Clone)]
pub enum ErrorKind {
SyntaxError(String),
EndOfTokenStream,
InvalidIdentifier,
UnknownVariable(String),
MeloVariable(String),
TypeError(String),
TopLevelBreak,
}