Returns a CPP conditional that is the opposite of the conditional passed in.
(condition: str)
| 13 | TokenStack = list[TokenAndCondition] |
| 14 | |
| 15 | def negate(condition: str) -> str: |
| 16 | """ |
| 17 | Returns a CPP conditional that is the opposite of the conditional passed in. |
| 18 | """ |
| 19 | if condition.startswith('!'): |
| 20 | return condition[1:] |
| 21 | return "!" + condition |
| 22 | |
| 23 | |
| 24 | is_a_simple_defined = re.compile(r'^defined\s*\(\s*[A-Za-z0-9_]+\s*\)$').match |
no test coverage detected
searching dependent graphs…