bindgen: snap

This commit is contained in:
nym21
2026-03-16 09:04:10 +01:00
parent c1565c5f42
commit 46d85d397d
7 changed files with 220 additions and 357 deletions

View File

@@ -695,12 +695,27 @@ pub fn generate_structural_patterns(
" \"\"\"Pattern struct for repeated tree structure.\"\"\""
)
.unwrap();
// Skip constructor for non-parameterizable patterns (inlined at tree level)
if !metadata.is_parameterizable(&pattern.name) {
writeln!(output, " pass\n").unwrap();
continue;
}
writeln!(output, " ").unwrap();
writeln!(
output,
" def __init__(self, client: BrkClientBase, acc: str):"
)
.unwrap();
if pattern.is_templated() {
writeln!(
output,
" def __init__(self, client: BrkClientBase, acc: str, disc: str):"
)
.unwrap();
} else {
writeln!(
output,
" def __init__(self, client: BrkClientBase, acc: str):"
)
.unwrap();
}
writeln!(
output,
" \"\"\"Create pattern node with accumulated metric name.\"\"\""