aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-08-18 08:19:44 +0200
committerumarcor <unai.martinezcorral@ehu.eus>2021-08-23 16:35:37 +0200
commit324d56b5ab4b1cdd1c43f412d4139a38dcb90eb9 (patch)
tree1da2e80c4757c85d47ff16bf821ef0d9dd5c6156 /pyGHDL/dom
parent32cb30ea5f674acd7ad7d5923fbd462be38d2046 (diff)
downloadghdl-324d56b5ab4b1cdd1c43f412d4139a38dcb90eb9.tar.gz
ghdl-324d56b5ab4b1cdd1c43f412d4139a38dcb90eb9.tar.bz2
ghdl-324d56b5ab4b1cdd1c43f412d4139a38dcb90eb9.zip
Handle open in map aspects.
Diffstat (limited to 'pyGHDL/dom')
-rw-r--r--pyGHDL/dom/Names.py8
-rw-r--r--pyGHDL/dom/_Translate.py10
2 files changed, 18 insertions, 0 deletions
diff --git a/pyGHDL/dom/Names.py b/pyGHDL/dom/Names.py
index f98555681..acb9cd1d6 100644
--- a/pyGHDL/dom/Names.py
+++ b/pyGHDL/dom/Names.py
@@ -42,6 +42,7 @@ from pyVHDLModel.SyntaxModel import (
SelectedName as VHDLModel_SelectedName,
AttributeName as VHDLModel_AttributeName,
AllName as VHDLModel_AllName,
+ OpenName as VHDLModel_OpenName,
Name,
)
from pyGHDL.libghdl._types import Iir
@@ -97,3 +98,10 @@ class AllName(VHDLModel_AllName, DOMMixin):
def __init__(self, node: Iir, prefix: Name):
super().__init__(prefix)
DOMMixin.__init__(self, node)
+
+
+@export
+class OpenName(VHDLModel_OpenName, DOMMixin):
+ def __init__(self, node: Iir):
+ super().__init__()
+ DOMMixin.__init__(self, node)
diff --git a/pyGHDL/dom/_Translate.py b/pyGHDL/dom/_Translate.py
index e7e862039..ed2e32ce3 100644
--- a/pyGHDL/dom/_Translate.py
+++ b/pyGHDL/dom/_Translate.py
@@ -73,6 +73,7 @@ from pyGHDL.dom.Names import (
AttributeName,
ParenthesisName,
AllName,
+ OpenName,
)
from pyGHDL.dom.Symbol import (
SimpleObjectOrFunctionCallSymbol,
@@ -673,6 +674,15 @@ def GetMapAspect(
actual = GetExpressionFromNode(nodes.Get_Actual(generic))
yield cls(generic, actual, formal)
+ elif kind is nodes.Iir_Kind.Association_Element_Open:
+ formalNode = nodes.Get_Formal(generic)
+ if formalNode is nodes.Null_Iir:
+ formal = None
+ else:
+ formal = GetNameFromNode(formalNode)
+
+ open = OpenName(generic)
+ yield cls(generic, open, formal)
else:
pos = Position.parse(generic)
raise DOMException(