IntegerBinOp¶
Integer Binary Operation expression type. An expr node.
Declaración¶
Sintaxis¶
IntegerBinOp(expr left, binop op, expr right, ttype type, expr? value)
Argumentos¶
left
and right
represent expression on the left and right side of operator
op
. type
represents table entry type and value
represents expression.
Valores devueltos¶
The return value is the expression that the IntegerBinOp represents.
Descripción¶
IntegerBinOp represents integer binary operation expression type. It is an ASR expr node. ASR has multiple binary expression types, for example: for Integer, real, complex, and logical.
If an binary expression is applying binary operator on integer operands,
IntegerBinOp
is called which then creates LFortran expression EXPR
using,
ASR::make_IntegerBinOp_t
method call.
The binary operations accept two arguments of the same type. IntegerBinOp only accepts integers.
Tipos¶
Only accepts integers.
Ejemplos¶
Following example code creates LFortran expression from ASR’s IntegerBinOp
:
(2+3)*5
ASR:
(TranslationUnit
(SymbolTable
1
{
})
[(IntegerBinOp
(IntegerBinOp
(IntegerConstant 2 (Integer 4 []))
Add
(IntegerConstant 3 (Integer 4 []))
(Integer 4 [])
(IntegerConstant 5 (Integer 4 []))
)
Mul
(IntegerConstant 5 (Integer 4 []))
(Integer 4 [])
(IntegerConstant 25 (Integer 4 []))
)]
)
Ver también¶
RealBinOp, ComplexBinOp, LogicalBinOp