コード例 #1
0
ファイル: builder.py プロジェクト: uxvworks/matlab2cpp
    def create_try(self, parent, cur):
        """
Create try-block

| Structure:
|   Tryblock
|   | Try
|   | | <code block>
|   | Catch
|   | | <code block>

Args:
    parent (Block): Reference to parent node
    cur (int): position where try-block is identified

Returns:
    int: position where try-block ends

See also:
    :py:func:`matlab2cpp.tree.branches.trybranch`
    """
        assert isinstance(parent, mc.collection.Block)
        return branches.trybranch(self, parent, cur)
コード例 #2
0
    def create_try(self, parent, cur):
        """
Create try-block

| Structure:
|   Tryblock
|   | Try
|   | | <code block>
|   | Catch
|   | | <code block>

Args:
    parent (Block): Reference to parent node
    cur (int): position where try-block is identified

Returns:
    int: position where try-block ends

See also:
    :py:func:`matlab2cpp.tree.branches.trybranch`
    """
        assert isinstance(parent, mc.collection.Block)
        return branches.trybranch(self, parent, cur)