Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Jul 10, 2023
1 parent da3ba53 commit 3bd31ec
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion addons/misra_9.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def parseInitializer(self, root, token):
else:
self.ed.parent.setInitialized(isDesignated)
self.ed.parent.initializeChildren()

else:
if self.ed.parent != self.root:
# Check if token is correct value type for self.root.children[?]
Expand All @@ -345,7 +346,15 @@ def parseInitializer(self, root, token):
parent = parent.parent
isDesignated = False

self.unwindAndContinue()
if self.token.isString:
if self.token == self.token.astParent.astOperand1 and self.token.astParent.astOperand2:
self.token = self.token.astParent.astOperand2
self.ed.markAsCurrent()
self.ed = self.root.getNextChild()
else:
self.unwindAndContinue()
else:
self.unwindAndContinue()

def pushToRootStackAndMarkAsDesignated(self):
new = self.ed.parent
Expand Down

0 comments on commit 3bd31ec

Please sign in to comment.