<reponame>L3tum/RIAL<filename>rial_old/concept/only_allowed_in_unsafe.py<gh_stars>1-10
from contextlib import contextmanager

from rial.ParserState import ParserState


@contextmanager
def only_allowed_in_unsafe():
    if not ParserState.llvmgen().currently_unsafe:
        raise PermissionError()
