Branch: Tag:

2014-12-04

2014-12-04 19:24:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Multiple type handling fixes.

* Allow markers for character ranges in strings.

* Allow indexing of marker assignments and scopes.

2074:    s = s->cdr;    continue;    } +  if ((char_type->type >= '0') && (char_type->type <= '9')) { +  fprintf(stderr, "$%c | ", char_type->type); +  s = s->cdr; +  continue; +  }   #ifdef PIKE_DEBUG    if (char_type->type != T_INT) {    Pike_fatal("Invalid node type (%d:%s) in string type.\n",
2097:    }    if (s->type == T_ZERO) {    fprintf(stderr, "zero"); +  } else if ((s->type >= '0') && (s->type <= '9')) { +  fprintf(stderr, "$%c", s->type);    } else {   #ifdef PIKE_DEBUG    if (s->type != T_INT) {
4823:    }       while((t->type == PIKE_T_NAME) || -  (t->type == PIKE_T_ATTRIBUTE)) { +  (t->type == PIKE_T_ATTRIBUTE) || +  (t->type == T_ASSIGN) || +  (t->type == T_SCOPE)) {    t = t->cdr;    }    while((index_type->type == PIKE_T_NAME) || -  (index_type->type == PIKE_T_ATTRIBUTE)) { +  (index_type->type == PIKE_T_ATTRIBUTE) || +  (index_type->type == T_ASSIGN) || +  (index_type->type == T_SCOPE)) {    index_type = index_type->cdr;    }   
5377:       case PIKE_T_NAME:    case PIKE_T_ATTRIBUTE: +  case T_ASSIGN: +  case T_SCOPE:    return low_check_indexing(type->cdr, index_type, n);       case T_ARRAY:
5471:       case PIKE_T_NAME:    case PIKE_T_ATTRIBUTE: +  case T_ASSIGN: +  case T_SCOPE:    return low_count_arguments(q->cdr);       default: return MAX_INT32;
5516:       case PIKE_T_NAME:    case PIKE_T_ATTRIBUTE: +  case T_ASSIGN: +  case T_SCOPE:    return low_minimum_arguments(q->cdr);       case T_FUNCTION: