Skip to content

Commit

Permalink
Removed commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Oct 18, 2024
1 parent e4b5bbc commit 6591e8b
Showing 1 changed file with 0 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,42 +113,6 @@ public List<CStatement> getPreStatements() {
return preStatements;
}

// @Override
// public Expr<?> visitConditionalExpression(CParser.ConditionalExpressionContext ctx) {
// if (ctx.expression() != null) {
// CStatement cond = ctx.logicalOrExpression().accept(functionVisitor);
// CStatement ifTrue = ctx.expression().accept(functionVisitor);
// CStatement ifFalse = ctx.conditionalExpression().accept(functionVisitor);
//
// Expr<?> expr = ctx.logicalOrExpression().accept(this);
// Expr<?> lhs = ifTrue.getExpression();
// Expr<?> rhs = ctx.conditionalExpression().accept(this);
//
// preStatements.add(new CIf(cond, ifTrue, ifFalse, parseContext));
//
// CComplexType smallestCommonType = CComplexType.getSmallestCommonType(List.of(CComplexType.getType(lhs, parseContext), CComplexType.getType(rhs, parseContext)), parseContext);
// IteExpr<?> ite = Ite(
// AbstractExprs.Neq(CComplexType.getType(expr, parseContext).getNullValue(), expr),
// smallestCommonType.castTo(lhs),
// smallestCommonType.castTo(rhs)
// );
// parseContext.getMetadata().create(ite, "cType", smallestCommonType);
// return ite;
// } else return ctx.logicalOrExpression().accept(this);
// }

// private void addPrePostStatementsForConditional(CStatement statement) {
// if (statement instanceof CCompound) {
// if (statement.getPreStatements() != null) preStatements.add(statement.getPreStatements());
// if (statement.getPostStatements() != null) postStatements.add(statement.getPostStatements());
// for (CStatement cStatement : ((CCompound) statement).getcStatementList()) {
// addPrePostStatementsForConditional(cStatement);
// }
// } else {
// preStatements.add(statement);
// }
// }

@Override
public Expr<?> visitLogicalOrExpression(CParser.LogicalOrExpressionContext ctx) {
if (ctx.logicalAndExpression().size() > 1) {
Expand Down

0 comments on commit 6591e8b

Please sign in to comment.