From 781e65e5a4444800982da71d97cb6b05d7dca17e Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Thu, 17 Dec 2020 21:56:07 -0800 Subject: 18 --- lib/Cargo.toml | 1 + lib/src/error.rs | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'lib') 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 "] 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 for Error { Error::Parse } } + +impl From, + &str>> for Error +{ + fn from(_: lalrpop_util::ParseError, + &str>) -> Error + { + Error::Parse + } +} + -- cgit 1.4.1