Source code for easier68k.core.enum.trap_vector

from enum import IntEnum
from ..util.parsing import parse_literal


class TrapVectors(IntEnum):
    pass


[docs]class TrapVectors(IntEnum): IO = 15
[docs] @staticmethod def parse(asm_str: str) -> TrapVectors: """ Parses a trap vector value from a string and returns a new TrapVector :param asm_str: :return: """ asm_str = asm_str.lower().strip() assert asm_str[0] == '#' return TrapVectors(parse_literal(asm_str[1:]))