Declare pattern transform functions in KCL (#7057)

* Declare pattern transform using KCL

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Boolean function param defaults

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Parse empty record types in fn types

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-05-20 08:25:29 +12:00
committed by GitHub
parent b1d1d89ca5
commit cf303ebe97
25 changed files with 383 additions and 16487 deletions

View File

@ -212,8 +212,9 @@ impl Type {
Type::Object { properties } => {
hasher.update(b"FnArgType::Object");
hasher.update(properties.len().to_ne_bytes());
for prop in properties.iter_mut() {
hasher.update(prop.compute_digest());
for (id, ty) in properties.iter_mut() {
hasher.update(id.compute_digest());
hasher.update(ty.compute_digest());
}
}
}