Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
chbloemer committed Dec 17, 2024
1 parent a4ba087 commit ecdaea4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
4 changes: 0 additions & 4 deletions src/main/java/de/neuland/pug4j/parser/node/CallNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ private List<MixinBlockNode> getInjectionPoints(Node block) {
for (IfConditionNode condition : ((ConditionalNode) node).getConditions()) {
result.addAll(getInjectionPoints(condition.getBlock()));
}
// } else if(node instanceof CaseNode.When){
// for (CaseConditionNode condition : ((CaseNode) node).getCaseConditionNodes()) {
// result.addAll(getInjectionPoints(condition.getBlock()));
// }
} else if (node.hasBlock()) {
result.addAll(getInjectionPoints(node.getBlock()));
}
Expand Down
21 changes: 0 additions & 21 deletions src/main/java/de/neuland/pug4j/parser/node/CaseNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

public class CaseNode extends Node {

private List<CaseConditionNode> caseConditionNodes = new LinkedList<CaseConditionNode>();
public static class When extends Node {
@Override
public void execute(IndentWriter writer, PugModel model, PugTemplate template) throws PugCompilerException {
Expand Down Expand Up @@ -42,24 +41,4 @@ public void execute(IndentWriter writer, PugModel model, PugTemplate template) t
private Boolean checkCondition(PugModel model, Node caseConditionNode, ExpressionHandler expressionHandler) throws ExpressionException {
return expressionHandler.evaluateBooleanExpression(value + " == " + caseConditionNode.getValue(), model);
}

public void setConditions(List<CaseConditionNode> caseConditionNodes) {
this.caseConditionNodes = caseConditionNodes;
}

public List<CaseConditionNode> getCaseConditionNodes() {
return caseConditionNodes;
}

@Override
public CaseNode clone() throws CloneNotSupportedException {
CaseNode clone = (CaseNode) super.clone();

clone.caseConditionNodes = new LinkedList<CaseConditionNode>();
for(CaseConditionNode condition : caseConditionNodes) {
clone.caseConditionNodes.add((CaseConditionNode) condition.clone());
}

return clone;
}
}

0 comments on commit ecdaea4

Please sign in to comment.