aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/_Translate.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyGHDL/dom/_Translate.py')
-rw-r--r--pyGHDL/dom/_Translate.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/pyGHDL/dom/_Translate.py b/pyGHDL/dom/_Translate.py
index 7d736f335..ebd650698 100644
--- a/pyGHDL/dom/_Translate.py
+++ b/pyGHDL/dom/_Translate.py
@@ -97,7 +97,7 @@ from pyGHDL.dom.Expression import (
RotateLeftExpression,
RotateRightExpression,
)
-from pyGHDL.dom.Subprogram import Function
+from pyGHDL.dom.Subprogram import Function, Procedure
from pyGHDL.dom.Misc import Alias
@@ -317,6 +317,11 @@ def GetDeclaredItemsFromChainedNodes(nodeChain: Iir, entity: str, name: str):
elif kind == nodes.Iir_Kind.Function_Body:
# functionName = NodeToName(item)
print("found function body '{name}'".format(name="????"))
+ elif kind == nodes.Iir_Kind.Procedure_Declaration:
+ result.append(GetProcedureFromNode(item))
+ elif kind == nodes.Iir_Kind.Procedure_Body:
+ # procedureName = NodeToName(item)
+ print("found procedure body '{name}'".format(name="????"))
elif kind == nodes.Iir_Kind.Object_Alias_Declaration:
result.append(GetAliasFromNode(item))
elif kind == nodes.Iir_Kind.Component_Declaration:
@@ -339,6 +344,12 @@ def GetFunctionFromNode(node: Iir):
return Function(functionName)
+def GetProcedureFromNode(node: Iir):
+ procedureName = GetNameOfNode(node)
+
+ return Procedure(procedureName)
+
+
def GetAliasFromNode(node: Iir):
aliasName = GetNameOfNode(node)