aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-07-26 01:21:36 +0200
committerumarcor <unai.martinezcorral@ehu.eus>2021-08-23 16:35:32 +0200
commit5fae449cbac688b5779f0ef2ec2052bb3f9bed00 (patch)
tree9e67f8a1be53f1ddc006543d4fffa243ea9a53a1 /pyGHDL
parent85efd6cebb7df0d4033a413d36a13e532be0c921 (diff)
downloadghdl-5fae449cbac688b5779f0ef2ec2052bb3f9bed00.tar.gz
ghdl-5fae449cbac688b5779f0ef2ec2052bb3f9bed00.tar.bz2
ghdl-5fae449cbac688b5779f0ef2ec2052bb3f9bed00.zip
Needed for changes in prettyprint for the Identifier(s) change in pyVHDLModel.
Diffstat (limited to 'pyGHDL')
-rw-r--r--pyGHDL/dom/_Translate.py2
-rw-r--r--pyGHDL/dom/formatting/prettyprint.py10
2 files changed, 6 insertions, 6 deletions
diff --git a/pyGHDL/dom/_Translate.py b/pyGHDL/dom/_Translate.py
index cbe707319..adff02041 100644
--- a/pyGHDL/dom/_Translate.py
+++ b/pyGHDL/dom/_Translate.py
@@ -301,8 +301,6 @@ def GetAnonymousTypeFromNode(node: Iir) -> BaseType:
@export
def GetSubtypeIndicationFromNode(node: Iir, entity: str, name: str) -> SubtypeOrSymbol:
subtypeIndicationNode = nodes.Get_Subtype_Indication(node)
- # if subtypeIndicationNode is nodes.Null_Iir:
- # return None
return GetSubtypeIndicationFromIndicationNode(subtypeIndicationNode, entity, name)
diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py
index 524ae9ab9..20355db24 100644
--- a/pyGHDL/dom/formatting/prettyprint.py
+++ b/pyGHDL/dom/formatting/prettyprint.py
@@ -340,7 +340,7 @@ class PrettyPrint:
else:
raise PrettyPrintException(
"Unhandled generic kind for generic '{name}'.".format(
- name=generic.Identifier
+ name=generic.Identifiers[0]
)
)
@@ -351,7 +351,9 @@ class PrettyPrint:
return self.formatPortSignal(port, level)
else:
raise PrettyPrintException(
- "Unhandled port kind for port '{name}'.".format(name=port.Identifier)
+ "Unhandled port kind for port '{name}'.".format(
+ name=port.Identifiers[0]
+ )
)
def formatGenericConstant(
@@ -417,9 +419,9 @@ class PrettyPrint:
buffer.append(
"{prefix}- constant {name} : {subtype} := {expr}".format(
prefix=prefix,
- name=item.Identifier,
+ name=", ".join(item.Identifiers),
subtype=self.formatSubtypeIndication(
- item.Subtype, "constant", item.Identifier
+ item.Subtype, "constant", item.Identifiers[0]
),
expr=str(item.DefaultExpression),
)