def create_if(self, parent, cur): """ Create if-branch | Structure (main): | Branch | | If | | | <cond expression> | | | <code block> | | <else if>* | | <else>? | | Structure (else if): | Elif | | <cond expression> | | <code block> | | Structure (else): | Else | | <code block> Args: parent (Block): Reference to parent node cur (int): position where if-branch is identified Returns: int: position where if-branch ends See also: :py:func:`matlab2cpp.tree.branches.ifbranch` """ assert isinstance(parent, mc.collection.Block) return branches.ifbranch(self, parent, cur)