def is_enum_namestack(nameStack):
    """Determines if a namestack is an enum namestack"""
    if not nameStack:
        return False
    if nameStack[0] == 'enum':
        return True
    if len(nameStack) > 1 and nameStack[0] == 'typedef' and nameStack[1
        ] == 'enum':
        return True
    return False
