Browse Source

Added UnaryOperatorExpression (finished it)

constants
Tristan B. V. Kildaire 10 months ago
parent
commit
ef9018db89
  1. 11
      source/tlang/compiler/symbols/expressions.d

11
source/tlang/compiler/symbols/expressions.d

@ -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

Loading…
Cancel
Save