Added UnaryOperatorExpression (finished it)

This commit is contained in:
Tristan B. Velloza Kildaire 2022-04-12 10:53:17 +02:00
parent 1e202fe788
commit ef9018db89
1 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,7 @@
module compiler.symbols.expressions;
import compiler.symbols.data;
import std.conv : to;
/* TODO: Look into arrays later */
public class StringExpression : Expression
@ -38,6 +39,16 @@ public class UnaryOperatorExpression : OperatorExpression
super(operator);
this.exp = exp;
}
public override string toString()
{
return "[unaryOperator: Op: "~to!(string)(operator)~", Expr: "~to!(string)(exp);
}
public Expression getExpression()
{
return exp;
}
}
public class BinaryOperatorExpression : OperatorExpression