diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Cargo.toml | 1 | ||||
-rw-r--r-- | lib/src/error.rs | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/Cargo.toml b/lib/Cargo.toml index f0a0859..6c46cec 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -5,3 +5,4 @@ authors = ["Irene Knapp <ireneista@gmail.com>"] edition = "2018" [dependencies] +lalrpop-util = "0.19" diff --git a/lib/src/error.rs b/lib/src/error.rs index 216df78..4f594b7 100644 --- a/lib/src/error.rs +++ b/lib/src/error.rs @@ -39,3 +39,14 @@ impl From<std::num::ParseIntError> for Error { Error::Parse } } + +impl From<lalrpop_util::ParseError<usize, lalrpop_util::lexer::Token<'_>, + &str>> for Error +{ + fn from(_: lalrpop_util::ParseError<usize, lalrpop_util::lexer::Token<'_>, + &str>) -> Error + { + Error::Parse + } +} + |