Fixed bug where temperature literals were not being calculated correctly with negative numbers

This commit is contained in:
2025-12-15 23:13:40 -07:00
parent 941e81a3e5
commit 477c2b1aef
5 changed files with 214 additions and 95 deletions

View File

@@ -1,6 +1,6 @@
use tokenizer::Tokenizer;
use crate::Parser;
use pretty_assertions::assert_eq;
use tokenizer::Tokenizer;
#[test]
fn test_block() -> anyhow::Result<()> {

View File

@@ -54,10 +54,7 @@ fn test_const_declaration() -> Result<()> {
let tokenizer = Tokenizer::from(input);
let mut parser = Parser::new(tokenizer);
assert_eq!(
"(const item = 293.15)",
parser.parse()?.unwrap().to_string()
);
assert_eq!("(const item = 20c)", parser.parse()?.unwrap().to_string());
assert_eq!(
"(const decimal = 200.15)",