| 488 | } |
| 489 | |
| 490 | void PrintLogicExp(std::stringstream &str, int dest, LogicExp* exp, int inv_, int rev) { |
| 491 | int inv = inv_; |
| 492 | while (exp->next) { |
| 493 | char* op; |
| 494 | int cond = exp->dest > dest; |
| 495 | inv = cond ? inv_ : !inv_; |
| 496 | PrintLogicItem(str, exp, inv, rev); |
| 497 | exp = exp->next; |
| 498 | if (inv_) cond = !cond; |
| 499 | if (rev) cond = !cond; |
| 500 | op = (char*)(cond ? "and" : "or"); |
| 501 | str << " " << op << " "; |
| 502 | } |
| 503 | PrintLogicItem(str, exp, inv_, rev); |
| 504 | } |
| 505 | |
| 506 | void TieAsNext(LogicExp* curr, LogicExp* item) { |
| 507 | curr->next = item; |
no test coverage detected