static LS tok_equalsCast(LS tok) {
  if (!tok.contains("cast")) ret tok;
  int iVar = -1;
  while ((iVar = jfind(tok, iVar+1, "<id> = cast")) >= 0) {
    int iTypeStart = tok_scanTypeBackwards(tok, iVar-2);
    int iCast = iVar+4;
    int j = scanToEndOfInitializer2(tok, iCast);
    S type = joinSubList(tok, iTypeStart, iVar-1);
    clearTokens(tok, iCast, iCast+1);
    if (!tok_typeIsObject(type)) {
      bool needBrackets = j > iCast+4;
      tokPrepend(tok, iCast+2, "(" + type + ") " + (needBrackets ? "(" : ""));
      if (needBrackets) tokPrepend(tok, j+1, ")");
    }
    reTok(tok, iCast, j+2);
  }
  ret tok;
}