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

Method tokAt

addons/misra.py:3206–3217  ·  view source on GitHub ↗
(tok,i)

Source from the content-addressed store, hash-verified

3204 indent = 0
3205 tok1 = None
3206 def tokAt(tok,i):
3207 while i < 0 and tok:
3208 tok = tok.previous
3209 if tok.str.startswith('//') or tok.str.startswith('/*'):
3210 continue
3211 i += 1
3212 while i > 0 and tok:
3213 tok = tok.next
3214 if tok.str.startswith('//') or tok.str.startswith('/*'):
3215 continue
3216 i -= 1
3217 return tok
3218
3219 def strtokens(tok, i1, i2):
3220 tok1 = tokAt(tok, i1)

Callers 15

checkRecursiveMethod · 0.45
possiblyAliasedMethod · 0.45
parseFunctionCallMethod · 0.45
isPointerDeRefMethod · 0.45
doAssignmentFunction · 0.45
skipBracketsAndMembersFunction · 0.45
forwardRangeMethod · 0.45

Calls

no outgoing calls