Compare commits
2 Commits
ed2f64eff9
...
b84ad2ef6b
Author | SHA1 | Date | |
---|---|---|---|
b84ad2ef6b | |||
60958538d8 |
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user