src/visit.c
double visit_literal(ast_t* node) {

    msg(2, "Visit %s AST node", NT_TOSTR(node->type));
    if(node != NULL)
        return node->value.val->val;
    else {
        error("invalid literal node");
        return NAN; // Not A Number
    }

    return NAN; // unreachable
}
/*
 * Visit node with literal number.
 */
Visit node with literal number.
Visit node with literal number .
double visit_literal(ast_t* node) {
    msg(2, "Visit %s AST node", NT_TOSTR(node->type));
    if(node != NULL)
        return node->value.val->val;
    else {
        error("invalid literal node");
        return NAN; 
    }
    return NAN; 
}
double visit_literal ( ast_t * node ) { msg ( 2 , " " , NT_TOSTR ( node -> type ) ) ; if ( node != NULL ) return node -> value . val -> val ; else { error ( " " ) ; return NAN ; } return NAN ; }
Visit node with literal number.
Visit node with literal number .
// Not A Number // unreachable