Skip to content

Commit

Permalink
Fix bug that type was not a accacable object within the Token.
Browse files Browse the repository at this point in the history
  • Loading branch information
wienans committed Feb 20, 2024
1 parent 648f09f commit 5881dd6
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions addons/cppcheckdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ class Token:

typeScopeId = None
typeScope = None
type = None

astParentId = None
astParent = None
Expand All @@ -355,27 +356,27 @@ def __init__(self, element):
self.previous = None
self.scopeId = element.get('scope')
self.scope = None
type = element.get('type')
if type == 'name':
self.type = element.get('type')
if self.type == 'name':
self.isName = True
if element.get('isUnsigned'):
self.isUnsigned = True
if element.get('isSigned'):
self.isSigned = True
elif type == 'number':
elif self.type == 'number':
self.isNumber = True
if element.get('isInt'):
self.isInt = True
elif element.get('isFloat'):
self.isFloat = True
elif type == 'string':
elif self.type == 'string':
self.isString = True
self.strlen = int(element.get('strlen'))
elif type == 'char':
elif self.type == 'char':
self.isChar = True
elif type == 'boolean':
elif self.type == 'boolean':
self.isBoolean = True
elif type == 'op':
elif self.type == 'op':
self.isOp = True
if element.get('isArithmeticalOp'):
self.isArithmeticalOp = True
Expand Down

0 comments on commit 5881dd6

Please sign in to comment.