Package compilation.analysis.syntax
Class UnaryExpression
- java.lang.Object
-
- compilation.analysis.syntax.UnaryExpression
-
- All Implemented Interfaces:
Expression
public final class UnaryExpression extends java.lang.Object implements Expression
The UnaryExpression class is used to store information about unary expressions declared during compilation.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description UnaryExpression(Token operatorToken, Expression operand)Constructs a UnaryExpression object, initialised with the expressions contents.
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface compilation.analysis.syntax.Expression
getChildren, getExpressionType, getSpan
-
-
-
-
Constructor Detail
-
UnaryExpression
public UnaryExpression(Token operatorToken, Expression operand)
Constructs a UnaryExpression object, initialised with the expressions contents.A SourceSpan containing the range of the expression is automatically generated, as well as a LinkedList of its children.
- Parameters:
operatorToken- The unary operator Tokenoperand- The Expression the operator is being applied to
-
-