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
FieldsModifier and TypeFieldDescriptionprotected JExpressionThe operand.protected StringThe unary operator.Fields inherited from class jminusminus.JExpression
isStatementExpression, typeFields inherited from class jminusminus.JAST
compilationUnit, line -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJUnaryExpression(int line, String operator, JExpression operand) Constructs an AST node for an unary expression. -
Method Summary
Modifier and TypeMethodDescriptionvoidtoJSON(JSONElement json) Stores information about this AST in JSON format.Methods inherited from class jminusminus.JExpression
analyze, codegen, isStatementExpression, typeMethods 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