Fixed bug where negative consts were not valid slang, revised build script to build the workshop folder to the release folder.

This commit is contained in:
2025-12-06 19:56:05 -07:00
parent d6548502cd
commit 0ea58e4921
7 changed files with 104 additions and 4 deletions

View File

@@ -151,3 +151,12 @@ fn test_const_hash_expression() -> Result<()> {
assert_eq!("(const i = hash(\"item\"))", expr.to_string());
Ok(())
}
#[test]
fn test_negative_literal_const() -> Result<()> {
let expr = parser!(r#"const i = -123"#).parse()?.unwrap();
assert_eq!("(const i = -123)", expr.to_string());
Ok(())
}