From 92ece39d5e0a5d1d1cc3a484f51037337b3f4a62 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 11 Sep 2017 03:10:10 -0700 Subject: [PATCH] Only IntLiteral Signed/unsigned is via - operator --- src/schala_lang/parsing.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/schala_lang/parsing.rs b/src/schala_lang/parsing.rs index d223e5f..a674e8a 100644 --- a/src/schala_lang/parsing.rs +++ b/src/schala_lang/parsing.rs @@ -360,8 +360,7 @@ pub enum Declaration { #[derive(Debug, PartialEq)] pub enum Expression { - UnsignedIntLiteral(u64), - SignedIntLiteral(i64), + IntLiteral(u64), FloatLiteral(f64), } @@ -453,7 +452,7 @@ impl Parser { } } else { match digits.parse::() { - Ok(d) => Ok(UnsignedIntLiteral(d)), + Ok(d) => Ok(IntLiteral(d)), Err(e) => unimplemented!("Need to handle numbers that don't parse to a Rust u64 {}", e), } }