Add an error class
This commit is contained in:
parent
b5f76deb98
commit
1dfdc001b3
2 changed files with 24 additions and 4 deletions
16
lexer/src/error.rs
Normal file
16
lexer/src/error.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/* lexer/src/error.rs
|
||||
* Eryn Wells <eryn@erynwells.me>
|
||||
*/
|
||||
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
pub struct Error {
|
||||
message: String
|
||||
}
|
||||
|
||||
impl Error {
|
||||
pub fn new(msg: String) -> Error {
|
||||
Error {
|
||||
message: msg
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue