Added support for compile-time constant hash expressions
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user