| 580 | } |
| 581 | |
| 582 | static const simplecpp::Token *gotoEndIf(const simplecpp::Token *cmdtok) |
| 583 | { |
| 584 | int level = 0; |
| 585 | while (nullptr != (cmdtok = cmdtok->next)) { |
| 586 | if (cmdtok->op == '#' && !sameline(cmdtok->previous,cmdtok) && sameline(cmdtok, cmdtok->next)) { |
| 587 | if (startsWith(cmdtok->next->str(),"if")) |
| 588 | ++level; |
| 589 | else if (cmdtok->next->str() == "endif") { |
| 590 | --level; |
| 591 | if (level < 0) |
| 592 | return cmdtok; |
| 593 | } |
| 594 | } |
| 595 | } |
| 596 | return nullptr; |
| 597 | } |
| 598 | |
| 599 | static void getConfigs(const simplecpp::TokenList &tokens, std::set<std::string> &defined, const std::string &userDefines, const std::set<std::string> &undefined, std::set<std::string> &ret) |
| 600 | { |
no test coverage detected