bool ast_need_wrap(const AST *a)
{
    switch (a->type) {
        case AST::ITER:
        case AST::NIL:
        case AST::STR:
        case AST::CLS:
        case AST::DOT:
        case AST::DEFAULT:
        case AST::TAG:
        case AST::CAP:
            return false;
        case AST::ALT:
        case AST::CAT:
        case AST::DIFF:
        case AST::REF:
            return true;
    }
    return false; /* unreachable */
}
bool ast_need_wrap(const AST *a)
{
    switch (a->type) {
        case AST::ITER:
        case AST::NIL:
        case AST::STR:
        case AST::CLS:
        case AST::DOT:
        case AST::DEFAULT:
        case AST::TAG:
        case AST::CAP:
            return false;
        case AST::ALT:
        case AST::CAT:
        case AST::DIFF:
        case AST::REF:
            return true;
    }
    return false;  
}