Package jminusminus
Class JUnaryExpression
java.lang.Object
jminusminus.JAST
jminusminus.JStatement
jminusminus.JExpression
jminusminus.JUnaryExpression
- Direct Known Subclasses:
JComplementOp
,JLogicalNotOp
,JNegateOp
,JPostDecrementOp
,JPostIncrementOp
,JPreDecrementOp
,JPreIncrementOp
,JUnaryPlusOp
This abstract base class is the AST node for an unary expression --- an expression with a
single operand.
-
Field Summary
Modifier and TypeFieldDescriptionprotected JExpression
The operand.protected String
The unary operator.Fields inherited from class jminusminus.JExpression
isStatementExpression, type
Fields inherited from class jminusminus.JAST
compilationUnit, line
-
Constructor Summary
ModifierConstructorDescriptionprotected
JUnaryExpression
(int line, String operator, JExpression operand) Constructs an AST node for an unary expression. -
Method Summary
Modifier and TypeMethodDescriptionvoid
toJSON
(JSONElement json) Stores information about this AST in JSON format.Methods inherited from class jminusminus.JExpression
analyze, codegen, isStatementExpression, type
Methods inherited from class jminusminus.JAST
codegen, line, partialCodegen, unescape
-
Field Details
-
operator
The unary operator. -
operand
The operand.
-
-
Constructor Details
-
JUnaryExpression
Constructs an AST node for an unary expression.- Parameters:
line
- line in which the unary expression occurs in the source file.operator
- the unary operator.operand
- the operand.
-
-
Method Details