aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/_Translate.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-21 19:19:50 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-22 12:26:59 +0200
commitf0517014231ee735c180a3150b55b878f6af763d (patch)
treedc44d1f8aec759ea01172b1084173cfb4a68404a /pyGHDL/dom/_Translate.py
parentba097bd3118db3135e75b913cae81973995777cd (diff)
downloadghdl-f0517014231ee735c180a3150b55b878f6af763d.tar.gz
ghdl-f0517014231ee735c180a3150b55b878f6af763d.tar.bz2
ghdl-f0517014231ee735c180a3150b55b878f6af763d.zip
Handle Physical...Literals
Diffstat (limited to 'pyGHDL/dom/_Translate.py')
-rw-r--r--pyGHDL/dom/_Translate.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pyGHDL/dom/_Translate.py b/pyGHDL/dom/_Translate.py
index e29a9f827..7d736f335 100644
--- a/pyGHDL/dom/_Translate.py
+++ b/pyGHDL/dom/_Translate.py
@@ -61,6 +61,8 @@ from pyGHDL.dom.Literal import (
CharacterLiteral,
FloatingPointLiteral,
StringLiteral,
+ PhysicalIntegerLiteral,
+ PhysicalFloatingLiteral,
)
from pyGHDL.dom.Expression import (
SubtractionExpression,
@@ -194,6 +196,8 @@ __EXPRESSION_TRANSLATION = {
nodes.Iir_Kind.Parenthesis_Name: IndexedObjectOrFunctionCallSymbol,
nodes.Iir_Kind.Integer_Literal: IntegerLiteral,
nodes.Iir_Kind.Floating_Point_Literal: FloatingPointLiteral,
+ nodes.Iir_Kind.Physical_Int_Literal: PhysicalIntegerLiteral,
+ nodes.Iir_Kind.Physical_Fp_Literal: PhysicalFloatingLiteral,
nodes.Iir_Kind.Character_Literal: CharacterLiteral,
nodes.Iir_Kind.String_Literal8: StringLiteral,
nodes.Iir_Kind.Negation_Operator: NegationExpression,
@@ -302,6 +306,8 @@ def GetDeclaredItemsFromChainedNodes(nodeChain: Iir, entity: str, name: str):
from pyGHDL.dom.Object import Signal
result.append(Signal.parse(item))
+ elif kind == nodes.Iir_Kind.Type_Declaration:
+ result.append(GetTypeFromNode(item))
elif kind == nodes.Iir_Kind.Anonymous_Type_Declaration:
result.append(GetTypeFromNode(item))
elif kind == nodes.Iir_Kind.Subtype_Declaration: