From e132e55fee2822f6eeb1e47a69491e69b22bb41f Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Wed, 1 Dec 2021 19:56:40 +0200 Subject: Extra parsers that may come up --- src/parsers.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/parsers.rs b/src/parsers.rs index c33a3cc..7e8ecc9 100644 --- a/src/parsers.rs +++ b/src/parsers.rs @@ -4,3 +4,15 @@ use std::str::FromStr; pub fn u64(input: &str) -> IResult<&str, u64> { map_res(digit1, u64::from_str)(input) } + +pub fn i64(input: &str) -> IResult<&str, i64> { + map_res(digit1, i64::from_str)(input) +} + +pub fn u32(input: &str) -> IResult<&str, u32> { + map_res(digit1, u32::from_str)(input) +} + +pub fn i32(input: &str) -> IResult<&str, i32> { + map_res(digit1, i32::from_str)(input) +} -- cgit v1.2.3