IfExp¶
If Expression, a expr
ASR node.
Declaración¶
Sintaxis¶
IfExp(expr test, expr body, expr orelse, ttype type, expr? value)
Argumentos¶
Argument Name |
Argument Description |
---|---|
|
expression to be tested |
|
0 or more statements or constructs to be executed inside |
|
construct to be executed if |
|
table entry type |
|
expresión |
Valores devueltos¶
The return value is the expression that the IfExp represents.
Descripción¶
IfExp represents If expression type. More information on if
can be found in
if.
Tipos¶
Not applicable.
Ejemplos¶
Following example code creates LFortran expression from ASR’s IntegerBinOp
:
program if
if(1) error stop
end
ASR:
(TranslationUnit
(SymbolTable
1
{
if:
(Program
(SymbolTable
2
{
})
if
[]
[(If
(IntegerConstant 1 (Integer 4 []))
[(ErrorStop
()
)]
[]
)]
)
})
[]
)