abstract class JComparison extends JBooleanBinaryExpression
lhs, operator, rhs
isStatementExpression, type
compilationUnit, line
Modifier | Constructor and Description |
---|---|
protected |
JComparison(int line,
String operator,
JExpression lhs,
JExpression rhs)
Create an AST node for a comparison expression.
|
Modifier and Type | Method and Description |
---|---|
JExpression |
analyze(Context context)
The analysis of a comparison operation consists of analyzing its two
operands, and making sure they both have the same numeric type.
|
codegen
writeToStdOut
codegen, isStatementExpression, type
line, partialCodegen
protected JComparison(int line, String operator, JExpression lhs, JExpression rhs)
line
- line in which the expression occurs in the source file.operator
- the comparison operator.lhs
- the lhs operand.rhs
- the rhs operand.public JExpression analyze(Context context)
analyze
in class JExpression
context
- context in which names are resolved.