| 524 | } |
| 525 | |
| 526 | template<class T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )> |
| 527 | static T* previousBeforeAstLeftmostLeafGeneric(T* tok) |
| 528 | { |
| 529 | if (!tok) |
| 530 | return nullptr; |
| 531 | T* leftmostLeaf = tok; |
| 532 | while (leftmostLeaf->astOperand1()) |
| 533 | leftmostLeaf = leftmostLeaf->astOperand1(); |
| 534 | return leftmostLeaf->previous(); |
| 535 | } |
| 536 | |
| 537 | const Token* previousBeforeAstLeftmostLeaf(const Token* tok) |
| 538 | { |
no test coverage detected