``switch`` a switch expression with a condition, cases, and default case :param ExpressionIndex condition: expression for the switch condition :param ExpressionIndex default_expr: expression for the default branch :param List[ExpressionIndex] cases: list of expressions for the switch cases
( self, condition: ExpressionIndex, default_expr: ExpressionIndex, cases: List[ExpressionIndex], loc: Optional['ILSourceLocation'] = None )
| 3052 | return self.expr(HighLevelILOperation.HLIL_FOR, init_expr, condition, update_expr, loop_expr, source_location=loc) |
| 3053 | |
| 3054 | def switch( |
| 3055 | self, condition: ExpressionIndex, default_expr: ExpressionIndex, cases: List[ExpressionIndex], |
| 3056 | loc: Optional['ILSourceLocation'] = None |
| 3057 | ) -> ExpressionIndex: |
| 3058 | """ |
| 3059 | ``switch`` a switch expression with a condition, cases, and default case |
| 3060 | |
| 3061 | :param ExpressionIndex condition: expression for the switch condition |
| 3062 | :param ExpressionIndex default_expr: expression for the default branch |
| 3063 | :param List[ExpressionIndex] cases: list of expressions for the switch cases |
| 3064 | :param ILSourceLocation loc: location of returned expression |
| 3065 | :return: The expression ``switch (condition) { cases...: ... default: default_expr }`` |
| 3066 | :rtype: ExpressionIndex |
| 3067 | """ |
| 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 |
nothing calls this directly
no test coverage detected