aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/DesignUnit.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-12-26 10:49:23 +0100
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-12-26 10:49:23 +0100
commitfd6fc2a7d5f577802fd4622501af4d871536fc41 (patch)
treea7fa9e96fd3bb233ddacdb55cdb81d81cccb9bec /pyGHDL/dom/DesignUnit.py
parent283418269b3f5e351415dc6e8946437a1781941c (diff)
downloadghdl-fd6fc2a7d5f577802fd4622501af4d871536fc41.tar.gz
ghdl-fd6fc2a7d5f577802fd4622501af4d871536fc41.tar.bz2
ghdl-fd6fc2a7d5f577802fd4622501af4d871536fc41.zip
More adjustments to new symbols.
Diffstat (limited to 'pyGHDL/dom/DesignUnit.py')
-rw-r--r--pyGHDL/dom/DesignUnit.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/pyGHDL/dom/DesignUnit.py b/pyGHDL/dom/DesignUnit.py
index 8ccdb91bb..054fe0e7b 100644
--- a/pyGHDL/dom/DesignUnit.py
+++ b/pyGHDL/dom/DesignUnit.py
@@ -77,7 +77,7 @@ from pyGHDL.dom._Translate import (
GetConcurrentStatementsFromChainedNodes,
)
from pyGHDL.dom.Names import SimpleName
-from pyGHDL.dom.Symbol import EntitySymbol, ContextReferenceSymbol, LibraryReferenceSymbol
+from pyGHDL.dom.Symbol import EntitySymbol, ContextReferenceSymbol, LibraryReferenceSymbol, PackageSymbol
@export
@@ -171,8 +171,7 @@ class Architecture(VHDLModel_Architecture, DOMMixin):
name = GetNameOfNode(architectureNode)
documentation = GetDocumentationOfNode(architectureNode)
entityNameNode = nodes.Get_Entity_Name(architectureNode)
- entityName = GetNameOfNode(entityNameNode)
- entitySymbol = EntitySymbol(entityNameNode, SimpleName(entityNameNode, entityName))
+ entitySymbol = EntitySymbol(entityNameNode, GetNameOfNode(entityNameNode))
declaredItems = GetDeclaredItemsFromChainedNodes(
nodes.Get_Declaration_Chain(architectureNode), "architecture", name
)
@@ -245,23 +244,24 @@ class PackageBody(VHDLModel_PackageBody, DOMMixin):
def __init__(
self,
node: Iir,
- identifier: str,
+ packageSymbol: PackageSymbol,
contextItems: Iterable[VHDLModel_ContextUnion] = None,
declaredItems: Iterable = None,
documentation: str = None,
):
- super().__init__(identifier, contextItems, declaredItems, documentation)
+ super().__init__(packageSymbol, contextItems, declaredItems, documentation)
DOMMixin.__init__(self, node)
@classmethod
def parse(cls, packageBodyNode: Iir, contextItems: Iterable[VHDLModel_ContextUnion]):
- name = GetNameOfNode(packageBodyNode)
+ packageName = GetNameOfNode(packageBodyNode)
+ packageSymbol = PackageSymbol(packageBodyNode, packageName)
documentation = GetDocumentationOfNode(packageBodyNode)
- declaredItems = GetDeclaredItemsFromChainedNodes(nodes.Get_Declaration_Chain(packageBodyNode), "package", name)
+ declaredItems = GetDeclaredItemsFromChainedNodes(nodes.Get_Declaration_Chain(packageBodyNode), "package", packageName)
# FIXME: read use clauses
- return cls(packageBodyNode, name, contextItems, declaredItems, documentation)
+ return cls(packageBodyNode, packageSymbol, contextItems, declaredItems, documentation)
@export
@@ -297,7 +297,7 @@ class Context(VHDLModel_Context, DOMMixin):
self,
node: Iir,
identifier: str,
- references: Iterable[Union[LibraryClause, UseClause]] = None,
+ references: Iterable[Union[LibraryClause, UseClause, ContextReference]] = None,
documentation: str = None,
):
super().__init__(identifier, references, documentation)