MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / isTernaryOperator

Function isTernaryOperator

addons/misra.py:1229–1234  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

1227
1228
1229def isTernaryOperator(token):
1230 if not token:
1231 return False
1232 if not token.astOperand2:
1233 return False
1234 return token.str == '?' and token.astOperand2.str == ':'
1235
1236
1237def getTernaryOperandsRecursive(token):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected