forked from AbleScript/ablescript
Eliminate type errors
Hooray, we've just made a whole class of errors impossible! :D
This commit is contained in:
parent
821eeae322
commit
50f9bfa4c6
|
@ -16,7 +16,6 @@ pub enum ErrorKind {
|
||||||
InvalidIdentifier,
|
InvalidIdentifier,
|
||||||
UnknownVariable(String),
|
UnknownVariable(String),
|
||||||
MeloVariable(String),
|
MeloVariable(String),
|
||||||
TypeError(String),
|
|
||||||
TopLevelBreak,
|
TopLevelBreak,
|
||||||
BfInterpretError(InterpretError),
|
BfInterpretError(InterpretError),
|
||||||
MismatchedArgumentError,
|
MismatchedArgumentError,
|
||||||
|
@ -56,7 +55,6 @@ impl Display for ErrorKind {
|
||||||
ErrorKind::InvalidIdentifier => write!(f, "invalid identifier"),
|
ErrorKind::InvalidIdentifier => write!(f, "invalid identifier"),
|
||||||
ErrorKind::UnknownVariable(name) => write!(f, "unknown identifier \"{}\"", name),
|
ErrorKind::UnknownVariable(name) => write!(f, "unknown identifier \"{}\"", name),
|
||||||
ErrorKind::MeloVariable(name) => write!(f, "banned variable \"{}\"", name),
|
ErrorKind::MeloVariable(name) => write!(f, "banned variable \"{}\"", name),
|
||||||
ErrorKind::TypeError(desc) => write!(f, "type error: {}", desc),
|
|
||||||
ErrorKind::TopLevelBreak => write!(f, "can only `break` out of a loop"),
|
ErrorKind::TopLevelBreak => write!(f, "can only `break` out of a loop"),
|
||||||
ErrorKind::BfInterpretError(err) => write!(f, "brainfuck error: {}", err),
|
ErrorKind::BfInterpretError(err) => write!(f, "brainfuck error: {}", err),
|
||||||
// TODO: give concrete numbers here.
|
// TODO: give concrete numbers here.
|
||||||
|
|
Loading…
Reference in a new issue