@classmethod
def c_var(cls, name):
c_tag = f"svp64_{cls.__name__.lower()}"
- yield f"enum {c_tag} {name};"
+ yield f"enum {c_tag} {name}"
# Python forbids inheriting from enum unless it's empty.
@classmethod
def c_var(cls, name):
- yield f"struct svp64_opcode {name};"
+ yield f"struct svp64_opcode {name}"
class IntegerOpcode(Opcode):
@classmethod
def c_var(cls, name):
- yield f"const char *{name};"
+ yield f"const char *{name}"
@_dataclasses.dataclass(eq=True, frozen=True)
yield from indent([f"uint64_t {field.name} : {bits};"])
bits_all += bits
else:
- yield from indent(field.type.c_var(name=field.name))
+ yield from indent(field.type.c_var(name=f"{field.name};"))
bits_rsvd = (64 - (bits_all % 64))
if bits_rsvd:
yield from indent([f"uint64_t : {bits_rsvd};"])
@classmethod
def c_var(cls, name):
- yield f"struct svp64_entry {name};"
+ yield f"struct svp64_entry {name}"
class Codegen(_enum.Enum):