From a3b6ae326e71cc410d53f18735d22df974c21b0a Mon Sep 17 00:00:00 2001 From: Alex Bethel Date: Mon, 30 Aug 2021 15:03:29 -0600 Subject: [PATCH] Add parsing negative numbers --- ablescript/src/lexer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ablescript/src/lexer.rs b/ablescript/src/lexer.rs index 1ac49d66..c622800d 100644 --- a/ablescript/src/lexer.rs +++ b/ablescript/src/lexer.rs @@ -139,7 +139,7 @@ pub enum Token { String(String), /// Integer - #[regex(r"[0-9]+", get_int)] + #[regex(r"-?[0-9]+", get_int)] Integer(i32), /// A C-complaint identifier