Initial commit
This commit is contained in:
commit
a4c4b85a16
20 changed files with 2036 additions and 0 deletions
13
src/error.rs
Normal file
13
src/error.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
GrammarError(String),
|
||||
SymbolError(String),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
impl From<serde_json::Error> for Error {
|
||||
fn from(error: serde_json::Error) -> Self {
|
||||
Error::GrammarError(error.to_string())
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue