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. - || $Id: las.c,v 1.359 2005/02/18 15:20:20 grubba Exp $ + || $Id: las.c,v 1.360 2005/03/20 12:32:57 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"
pike.git/src/las.c:3576:    copy_pike_type(n->type, mixed_type_string);    }    else {    node *low = CADR (n), *high = CDDR (n);    n->type = range_type(CAR(n)->type,    low->token == F_RANGE_OPEN ? NULL : CAR (low)->type,    high->token == F_RANGE_OPEN ? NULL : CAR (high)->type);    }    break;    +  case F_PUSH_ARRAY: +  if (CAR(n)) { +  struct pike_type *array_type; +  MAKE_CONSTANT_TYPE(array_type, tArr(tZero)); +  if (!pike_types_le(array_type, CAR(n)->type)) { +  yytype_error("Bad argument to splice operator.", +  array_type, CAR(n)->type, 0); +  } +  } +  /* FIXME: The type field of the splice operator is not yet utilized. +  * +  * It probably ought to be something similar to MANY(..., VOID). +  */ +  copy_pike_type(n->type, mixed_type_string); +  break; +     case F_AUTO_MAP_MARKER:    if (!CAR(n) || (CAR(n)->type == void_type_string)) {    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;    if(!match_types(type_a, array_type_string))    if(!Pike_compiler->catch_level)    yyerror("[*] on non-array.");