pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file is part of Pike. For copyright information see COPYRIGHT.   ||| Pike is distributed under GPL, LGPL and MPL. See the file COPYING   ||| for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.291 2002/05/31 22:41:24 nilsson Exp $"); + RCSID("$Id: las.c,v 1.292 2002/06/03 12:25:18 grubba Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:3459:    "a variable of type %s.",    t1->str, t2->str);    free_string(t2);    free_string(t1);    }    }    }    n->type = and_pike_types(CAR(n)->type, CDR(n)->type);    break;    +  case F_ARRAY_LVALUE: +  { +  node *lval_list; +  if (!(lval_list = CAR(n))) { +  copy_pike_type(n->type, mixed_type_string); +  } else { +  struct pike_type *t; +  node *n2; +  +  if (lval_list->token == F_LVALUE_LIST) { +  n2 = CAR(lval_list); +  } else { +  n2 = lval_list; +  } +  +  if (n2) { +  copy_pike_type(t, n2->type); +  } else { +  copy_pike_type(t, zero_type_string); +  } +  while ((n2 != lval_list) && (lval_list = CDR(lval_list))) { +  if (lval_list->token == F_LVALUE_LIST) { +  n2 = CAR(lval_list); +  } else { +  n2 = lval_list; +  } +  if (n2) { +  struct pike_type *tmp = or_pike_types(t, n2->type, 1); +  free_type(t); +  t = tmp; +  } +  } +  type_stack_mark(); +  push_finished_type(t); +  push_type(T_ARRAY); +  free_type(t); +  n->type = pop_unfinished_type(); +  } +  } +  break; +     case F_INDEX:    case F_ARROW:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    my_yyerror("Indexing a void expression.");    /* The optimizer converts this to an expression returning 0. */    copy_pike_type(n->type, zero_type_string);    } else {    type_a=CAR(n)->type;    type_b=CDR(n)->type;    if(!check_indexing(type_a, type_b, n))