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

Method strtokens

addons/misra.py:3219–3231  ·  view source on GitHub ↗
(tok, i1, i2)

Source from the content-addressed store, hash-verified

3217 return tok
3218
3219 def strtokens(tok, i1, i2):
3220 tok1 = tokAt(tok, i1)
3221 tok2 = tokAt(tok, i2)
3222 tok = tok1
3223 s = ''
3224 while tok != tok2:
3225 if tok.str.startswith('//') or tok.str.startswith('/*'):
3226 tok = tok.next
3227 continue
3228 s += ' ' + tok.str
3229 tok = tok.next
3230 s += ' ' + tok.str
3231 return s[1:]
3232
3233 for token in rawTokens:
3234 if token.str in ['if', 'for', 'while']:

Callers

nothing calls this directly

Calls 1

tokAtFunction · 0.85

Tested by

no test coverage detected