From 6f8a49b71148bfb6e7b58802aa82eb747e7659cd 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