예제 #1
0
    def raise_semantics(self, stmt: Raise, state: State) -> State:
        """Semantics of raising an Error.

        :param stmt: raise statement to be executed
        :param state: state before executing the raise Error
        :return: state modified by the raise
        """
        return state.raise_error()
예제 #2
0
    def raise_semantics(self, _, state: State,
                        interpreter: Interpreter) -> State:
        """Semantics of raising an Error.

        :param _: raise statement to be executed
        :param state: state before executing the raise Error
        :return: state modified by the raise
        """
        return state.raise_error()