// process ifdef x ... endifdef blocks
static void tok_ifdef(LS tok, IPred<S> isDefined) {
  // ifdef x or y
  jreplace_dyn(tok, "ifdef <id> or <id>", (_tok, cIdx) -> {
    S flag1 = tok.get(cIdx+2), flag2 = tok.get(cIdx+6);
    bool value = isDefined.get(flag1) || isDefined.get(flag2);
    //print("ifdef: " + flag1 + " | " + flag2 + " = " + value);
    ret "ifdef " + value;
  });
  
  tok_conditionals(tok, "ifdef", "endifdef", isDefined, true, false);
}