Branch: Tag:

2020-09-24

2020-09-24 14:42:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added PT_FLAG_BOTH_MARKERS{,_AND,_OR,_MASK}.

This causes remap_markers() to use both marker sets and emit an
T_AND or T_OR type when a marker is found in both.

3805:    } else {    push_type(marker);    } +  if (flags & PT_FLAG_BOTH_MARKERS) { +  marker = remap_marker(remap, t->type ^ 0x10, flags); +  if (!marker) { +  /* FIXME: Improved error handling here. */ +  push_type(T_MIXED); +  } else { +  push_type(marker); +  } +  switch(flags & PT_FLAG_BOTH_MARKERS_MASK) { +  case PT_FLAG_BOTH_MARKERS_AND: +  push_type(T_AND);    break; -  +  case PT_FLAG_BOTH_MARKERS_OR: +  push_type(T_OR); +  break; +  default: +  Pike_fatal("Unsupported marker joining method.\n"); +  break;    } -  +  } +  break; +  }       case PIKE_T_NAME:    push_remap_markers(t->cdr, remap, flags);