Merge remote-tracking branch 'origin/master'

This commit is contained in:
Jochen Seyfried 2024-06-27 08:47:54 +02:00
commit eac4eb1db8
2 changed files with 4 additions and 3 deletions

View File

@ -15,8 +15,8 @@ import java.util.Objects;
public class UnaryExpression extends AbstractType implements IExpression{ public class UnaryExpression extends AbstractType implements IExpression{
public String operator; public String operator;
public IDatatype operand; public IExpression operand;
public UnaryExpression(String operator, IDatatype operand){ public UnaryExpression(String operator, IExpression operand){
this.operator = operator; this.operator = operator;
this.operand = operand; this.operand = operand;
} }

View File

@ -271,7 +271,8 @@ public class ASTGenerator extends DecafBaseVisitor<Node> {
} else if (ctx.value() != null) { } else if (ctx.value() != null) {
return visitValue(ctx.value()); return visitValue(ctx.value());
} else if (ctx.binaryExpr() != null) { } else if (ctx.binaryExpr() != null) {
//todo IExpression expression = (IExpression) visit(ctx.binaryExpr());
return new UnaryExpression("!", expression);
} }
return null; return null;
} }