MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / if_expr

Method if_expr

python/highlevelil.py:2992–3007  ·  view source on GitHub ↗

``if_expr`` an if-statement expression with a condition and true/false branches. An ``else`` statement is included if the false_expr is not a NOP expression :param ExpressionIndex condition: expression for the condition to test :param ExpressionIndex true_expr: expression for the true bran

(
		self, condition: ExpressionIndex, true_expr: ExpressionIndex, false_expr: ExpressionIndex,
		loc: Optional['ILSourceLocation'] = None
	)

Source from the content-addressed store, hash-verified

2990 return self.expr(HighLevelILOperation.HLIL_BLOCK, len(exprs), self.add_operand_list(exprs), source_location=loc)
2991
2992 def if_expr(
2993 self, condition: ExpressionIndex, true_expr: ExpressionIndex, false_expr: ExpressionIndex,
2994 loc: Optional['ILSourceLocation'] = None
2995 ) -> ExpressionIndex:
2996 """
2997 ``if_expr`` an if-statement expression with a condition and true/false branches.
2998 An ``else`` statement is included if the false_expr is not a NOP expression
2999
3000 :param ExpressionIndex condition: expression for the condition to test
3001 :param ExpressionIndex true_expr: expression for the true branch
3002 :param ExpressionIndex false_expr: expression for the false branch
3003 :param ILSourceLocation loc: location of returned expression
3004 :return: The expression ``if (condition) { true_expr } else { false_expr }``
3005 :rtype: ExpressionIndex
3006 """
3007 return self.expr(HighLevelILOperation.HLIL_IF, condition, true_expr, false_expr, source_location=loc)
3008
3009 def while_expr(
3010 self, condition: ExpressionIndex, loop_expr: ExpressionIndex, loc: Optional['ILSourceLocation'] = None

Callers

nothing calls this directly

Calls 1

exprMethod · 0.95

Tested by

no test coverage detected