diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-06-22 23:30:06 +0200 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-06-22 23:30:06 +0200 |
commit | 6b5e08c5373607115cb0fec38b67a76e2f7f8927 (patch) | |
tree | 753ee3e4dc0c82b4da339ade374488b51afd4d8c /pyGHDL/dom/_Translate.py | |
parent | f8e700709132f7a65b0962c38379bf4c39033f12 (diff) | |
download | ghdl-6b5e08c5373607115cb0fec38b67a76e2f7f8927.tar.gz ghdl-6b5e08c5373607115cb0fec38b67a76e2f7f8927.tar.bz2 ghdl-6b5e08c5373607115cb0fec38b67a76e2f7f8927.zip |
Handle shared variables.
Diffstat (limited to 'pyGHDL/dom/_Translate.py')
-rw-r--r-- | pyGHDL/dom/_Translate.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pyGHDL/dom/_Translate.py b/pyGHDL/dom/_Translate.py index 2b2a44e60..18b4160b8 100644 --- a/pyGHDL/dom/_Translate.py +++ b/pyGHDL/dom/_Translate.py @@ -366,6 +366,14 @@ def GetDeclaredItemsFromChainedNodes(nodeChain: Iir, entity: str, name: str): from pyGHDL.dom.Object import Constant result.append(Constant.parse(item)) + + elif kind == nodes.Iir_Kind.Variable_Declaration: + from pyGHDL.dom.Object import SharedVariable + + if nodes.Get_Shared_Flag(item): + result.append(SharedVariable.parse(item)) + else: + raise DOMException("Found non-shared variable.") elif kind == nodes.Iir_Kind.Signal_Declaration: from pyGHDL.dom.Object import Signal |