Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
eac4eb1db8
@ -15,8 +15,8 @@ import java.util.Objects;
|
||||
|
||||
public class UnaryExpression extends AbstractType implements IExpression{
|
||||
public String operator;
|
||||
public IDatatype operand;
|
||||
public UnaryExpression(String operator, IDatatype operand){
|
||||
public IExpression operand;
|
||||
public UnaryExpression(String operator, IExpression operand){
|
||||
this.operator = operator;
|
||||
this.operand = operand;
|
||||
}
|
||||
|
@ -271,7 +271,8 @@ public class ASTGenerator extends DecafBaseVisitor<Node> {
|
||||
} else if (ctx.value() != null) {
|
||||
return visitValue(ctx.value());
|
||||
} else if (ctx.binaryExpr() != null) {
|
||||
//todo
|
||||
IExpression expression = (IExpression) visit(ctx.binaryExpr());
|
||||
return new UnaryExpression("!", expression);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user