forked from AbleScript/ablescript
e31b8fb00d
Added code for interpreting parsed AbleScript expressions and statements, and hooked it up to the REPL.
18 lines
320 B
Rust
18 lines
320 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),
|
|
}
|