summaryrefslogtreecommitdiff
path: root/src/parsers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parsers.rs')
-rw-r--r--src/parsers.rs12
1 files changed, 12 insertions, 0 deletions
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)
+}