feat: 搭建原生函数基础设施

This commit is contained in:
2026-06-07 01:07:45 +08:00
parent 5e78cb672f
commit 439b61e359
17 changed files with 271 additions and 15 deletions
+8 -1
View File
@@ -125,8 +125,15 @@ fn hash_expression(expr: &Expression, h: &mut rustc_hash::FxHasher) {
std::mem::discriminant(&un.operator).hash(h);
hash_expression(&un.argument, h);
}
Expression::CallExpression(_) => {
Expression::CallExpression(call) => {
2u8.hash(h);
(call.arguments.len() as u32).hash(h);
hash_expression(&call.callee, h);
for arg in &call.arguments {
if let Some(expr) = arg.as_expression() {
hash_expression(expr, h);
}
}
}
Expression::LogicalExpression(log) => {
3u8.hash(h);