builtup4/bu4/parsing/constructs/pexception.py
2021-08-20 06:12:04 +03:00

17 lines
513 B
Python

# Copyright (c) PARRRATE T&V 2021. All rights reserved.
__all__ = ('PException',)
from bu4.linking.constructs.lexception import LException
from bu4.linking.states.linkingfinished import LinkingFinished
from bu4.linking.states.linkingstate import LinkingState
from bu4.parsing.constructs.parsed import Parsed
class PException(Parsed):
def __init__(self, name: bytes):
self.name = name
def link(self, promise: set[bytes]) -> LinkingState:
return LinkingFinished(LException(self.name))