Added support for compile-time constant hash expressions

This commit is contained in:
2025-12-05 21:34:51 -07:00
parent 93b5f28ccb
commit 9993bff574
10 changed files with 150 additions and 21 deletions

View File

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