able-script/src/error.rs

20 lines
360 B
Rust
Raw Normal View History

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,
ArithmeticError,
2021-04-27 06:48:56 -05:00
}