pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:912:    res->tree_info |= (b->tree_info & ~(OPT_BREAK|OPT_CONTINUE));    }    break;       case F_SSCANF:    if(!b || count_args(b) == 0) break;    res->node_info |= OPT_ASSIGNMENT;    break;       case F_APPEND_ARRAY: +  case F_APPEND_MAPPING:    case F_MULTI_ASSIGN:    case F_ASSIGN:    case F_ASSIGN_SELF:    res->node_info |= OPT_ASSIGNMENT;    if (a) {    res->tree_info |= a->tree_info;    }    if (b) {    res->tree_info |= b->tree_info;    }
pike.git/src/las.c:2735:    find_written_vars(CAR(n), p, 1);    break;       case F_ASSIGN:    case F_ASSIGN_SELF:    case F_MULTI_ASSIGN:    find_written_vars(CAR(n), p, 0);    find_written_vars(CDR(n), p, 1);    break;    +  case F_APPEND_MAPPING:    case F_APPEND_ARRAY:    find_written_vars(CAR(n), p, 1);    find_written_vars(CDR(n), p, 0);    break;       case F_SSCANF:    find_written_vars(CAR(n), p, 0);    /* FIXME: Marks arg 2 as written for now.    */    find_written_vars(CDR(n), p, 1);
pike.git/src/las.c:3192:    if (!CDR(n) || CDR(n)->type == void_type_string)    copy_pike_type(n->type, void_type_string);    else if(n->token == F_LAND || CAR(n)->type == CDR(n)->type)    {    copy_pike_type(n->type, CDR(n)->type);    }else{    n->type = or_pike_types(CAR(n)->type, CDR(n)->type, 0);    }    break;    +  case F_APPEND_MAPPING: +  if (!CAR(n) || (CAR(n)->type == void_type_string)) { +  yyerror("Assigning a void expression."); +  copy_pike_type(n->type, void_type_string); +  } +  else +  /* FIXME: Not really correct, should calculate type of RHS. */ +  copy_pike_type(n->type, CAR(n)->type); +  break; +     case F_APPEND_ARRAY:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    yyerror("Assigning a void expression.");    copy_pike_type(n->type, void_type_string);    } else if (!CDR(n)) {    copy_pike_type(n->type, CAR(n)->type);    } else {    struct pike_type *tmp;    /* Ensure that the type-fields are up to date. */    fix_type_field(CAR(n));