aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/_Translate.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-07-26 21:38:43 +0200
committerumarcor <unai.martinezcorral@ehu.eus>2021-08-23 16:35:32 +0200
commit47ec53b54ce661a806f371734754483ef906c563 (patch)
tree5a4dd61771cb85e849698d1fe09aa064697357a9 /pyGHDL/dom/_Translate.py
parent77f969a11ea5ac38f007dbf3aab986dcf10125b0 (diff)
downloadghdl-47ec53b54ce661a806f371734754483ef906c563.tar.gz
ghdl-47ec53b54ce661a806f371734754483ef906c563.tar.bz2
ghdl-47ec53b54ce661a806f371734754483ef906c563.zip
Also handle multiple identifiers in record elements.
Diffstat (limited to 'pyGHDL/dom/_Translate.py')
-rw-r--r--pyGHDL/dom/_Translate.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pyGHDL/dom/_Translate.py b/pyGHDL/dom/_Translate.py
index 740c613b6..916f0c8df 100644
--- a/pyGHDL/dom/_Translate.py
+++ b/pyGHDL/dom/_Translate.py
@@ -478,9 +478,11 @@ def GetGenericsFromChainedNodes(
genericConstant = GenericConstantInterfaceItem.parse(generic)
+ # Lookahead for generics with multiple identifiers at once
if nodes.Get_Has_Identifier_List(generic):
nextNode = nodes.Get_Chain(generic)
for nextGeneric in utils.chain_iter(nextNode):
+ # Consecutive identifiers are found, if the subtype indication is Null
if nodes.Get_Subtype_Indication(nextGeneric) == nodes.Null_Iir:
genericConstant.Identifiers.append(GetNameOfNode(nextGeneric))
else:
@@ -529,9 +531,11 @@ def GetPortsFromChainedNodes(
portSignal = PortSignalInterfaceItem.parse(port)
+ # Lookahead for ports with multiple identifiers at once
if nodes.Get_Has_Identifier_List(port):
nextNode = nodes.Get_Chain(port)
for nextPort in utils.chain_iter(nextNode):
+ # Consecutive identifiers are found, if the subtype indication is Null
if nodes.Get_Subtype_Indication(nextPort) == nodes.Null_Iir:
portSignal.Identifiers.append(GetNameOfNode(nextPort))
else:
@@ -593,9 +597,11 @@ def GetParameterFromChainedNodes(
)
)
+ # Lookahead for parameters with multiple identifiers at once
if nodes.Get_Has_Identifier_List(parameter):
nextNode = nodes.Get_Chain(parameter)
for nextParameter in utils.chain_iter(nextNode):
+ # Consecutive identifiers are found, if the subtype indication is Null
if nodes.Get_Subtype_Indication(nextParameter) == nodes.Null_Iir:
param.Identifiers.append(GetNameOfNode(nextParameter))
else:
@@ -721,9 +727,11 @@ def GetDeclaredItemsFromChainedNodes(
item = nodes.Get_Chain(item)
continue
+ # Lookahead for objects with multiple identifiers at once
if nodes.Get_Has_Identifier_List(item):
nextNode = nodes.Get_Chain(item)
for nextItem in utils.chain_iter(nextNode):
+ # Consecutive identifiers are found, if the subtype indication is Null
if nodes.Get_Subtype_Indication(nextItem) == nodes.Null_Iir:
obj.Identifiers.append(GetNameOfNode(nextItem))
else: