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

Function isSimpleEscapeSequence

addons/misra.py:1221–1226  ·  view source on GitHub ↗

Checks that given symbols are simple escape sequence. Reference: n1570 6.4.4.4

(symbols)

Source from the content-addressed store, hash-verified

1219
1220
1221def isSimpleEscapeSequence(symbols):
1222 """Checks that given symbols are simple escape sequence.
1223 Reference: n1570 6.4.4.4"""
1224 if len(symbols) != 2 or symbols[0] != '\\':
1225 return False
1226 return symbols[1] in ("'", '"', '?', '\\', 'a', 'b', 'f', 'n', 'r', 't', 'v')
1227
1228
1229def isTernaryOperator(token):

Callers 1

misra_4_1Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected