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

Method case

python/highlevelil.py:3070–3082  ·  view source on GitHub ↗

``case`` a switch case for values ``values`` with body ``expr`` :param List[ExpressionIndex] values: matched values for the case :param ExpressionIndex expr: body of switch case :param ILSourceLocation loc: location of returned expression :return: The expression ``case values...: { expr

(
		self, values: List[ExpressionIndex], expr: ExpressionIndex, loc: Optional['ILSourceLocation'] = None
	)

Source from the content-addressed store, hash-verified

3068 return self.expr(HighLevelILOperation.HLIL_SWITCH, condition, default_expr, len(cases), self.add_operand_list(cases), source_location=loc)
3069
3070 def case(
3071 self, values: List[ExpressionIndex], expr: ExpressionIndex, loc: Optional['ILSourceLocation'] = None
3072 ) -> ExpressionIndex:
3073 """
3074 ``case`` a switch case for values ``values`` with body ``expr``
3075
3076 :param List[ExpressionIndex] values: matched values for the case
3077 :param ExpressionIndex expr: body of switch case
3078 :param ILSourceLocation loc: location of returned expression
3079 :return: The expression ``case values...: { expr }``
3080 :rtype: ExpressionIndex
3081 """
3082 return self.expr(HighLevelILOperation.HLIL_CASE, len(values), self.add_operand_list(values), expr, source_location=loc)
3083
3084 def break_expr(self, loc: Optional['ILSourceLocation'] = None) -> ExpressionIndex:
3085 """

Callers

nothing calls this directly

Calls 2

exprMethod · 0.95
add_operand_listMethod · 0.95

Tested by

no test coverage detected