def _parse_enum(self) -> ASTEnum:
    scoped = None
    self.skip_ws()
    name = self._parse_nested_name()
    self.skip_ws()
    underlyingType = None
    if self.skip_string(':'):
        underlyingType = self._parse_type(named=False)
    return ASTEnum(name, scoped, underlyingType)
def _parse_enum(self) -> ASTEnum:
    scoped = None
    self.skip_ws()
    name = self._parse_nested_name()
    self.skip_ws()
    underlyingType = None
    if self.skip_string(':'):
        underlyingType = self._parse_type(named=False)
    return ASTEnum(name, scoped, underlyingType)