diff options
author | Irene Knapp <ireneista@gmail.com> | 2020-12-17 21:56:07 -0800 |
---|---|---|
committer | Irene Knapp <ireneista@gmail.com> | 2020-12-17 21:56:07 -0800 |
commit | 781e65e5a4444800982da71d97cb6b05d7dca17e (patch) | |
tree | c9919f20c0153409b0d344f33e5a4791177387da /lib | |
parent | 9acefe571def801d63282620cb31833a321bc551 (diff) |
18
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 + } +} + |