cppcheckdata.py: Added Token.getValue()
This commit is contained in:
parent
4a784ce2e9
commit
54dbb5f832
|
@ -63,6 +63,16 @@ class Token:
|
|||
self.astOperand1 = IdMap[self.astOperand1Id]
|
||||
self.astOperand2 = IdMap[self.astOperand2Id]
|
||||
|
||||
# Get value if it exists
|
||||
# Returns None if it doesn't exist
|
||||
def getValue(self,v):
|
||||
if not self.values:
|
||||
return None
|
||||
for value in self.values:
|
||||
if value.intvalue == v:
|
||||
return value
|
||||
return None
|
||||
|
||||
class Scope:
|
||||
Id = None
|
||||
classStartId = None
|
||||
|
|
Loading…
Reference in New Issue