Skip to content

Commit eb83265

Browse files
hs-lsongclaude
andcommitted
Simplify appendStructure by delegating to AstParameters
Use params.appendStructure() instead of manually iterating through children, reducing code duplication. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 372c0a8 commit eb83265

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main/java/com/hubspot/jinjava/el/ext/AstFilterChain.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,7 @@ public void appendStructure(StringBuilder builder, Bindings bindings) {
170170
builder.append('|').append(spec.getName());
171171
AstParameters params = spec.getParams();
172172
if (params != null && params.getCardinality() > 0) {
173-
builder.append('(');
174-
for (int i = 0; i < params.getCardinality(); i++) {
175-
if (i > 0) {
176-
builder.append(", ");
177-
}
178-
params.getChild(i).appendStructure(builder, bindings);
179-
}
180-
builder.append(')');
173+
params.appendStructure(builder, bindings);
181174
}
182175
}
183176
}

0 commit comments

Comments
 (0)