Package iota
Class INegateOp
The AST node for a unary negation (-) expression.
-
Field Summary
Fields inherited from class iota.IUnaryExpression
operand, operator
Fields inherited from class iota.IExpression
isStatementExpression, type
Fields inherited from class iota.IAST
compilationUnit, line
-
Constructor Summary
ConstructorsConstructorDescriptionINegateOp
(int line, IExpression operand) Constructs an AST node for a negation expression. -
Method Summary
Modifier and TypeMethodDescriptionAnalyzes and returns an IExpression.void
Performs code generation for this AST.Methods inherited from class iota.IUnaryExpression
toJSON
Methods inherited from class iota.IExpression
codegen, type
Methods inherited from class iota.IAST
line, preAnalyze
-
Constructor Details
-
INegateOp
Constructs an AST node for a negation expression.- Parameters:
line
- line in which the negation expression occurs in the source file.operand
- the operand.
-
-
Method Details
-
analyze
Analyzes and returns an IExpression.- Specified by:
analyze
in classIExpression
- Parameters:
context
- context in which names are resolved.- Returns:
- the analyzed (and possibly rewritten) AST subtree.
-
codegen
Performs code generation for this AST.
-