aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/formatting
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-21 21:44:31 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-22 12:28:25 +0200
commitad34fac3f4e30f0ff13e1630b42373f31b2918a4 (patch)
tree965e614ea5755baad99a0ad0024433b0f16b90ab /pyGHDL/dom/formatting
parent7e44124316ee6b3b7f8d3ee040ef63f0d2f2e65d (diff)
downloadghdl-ad34fac3f4e30f0ff13e1630b42373f31b2918a4.tar.gz
ghdl-ad34fac3f4e30f0ff13e1630b42373f31b2918a4.tar.bz2
ghdl-ad34fac3f4e30f0ff13e1630b42373f31b2918a4.zip
Fixed function call parameters.
Fixed physical literal units. Added basic Procedure detection.
Diffstat (limited to 'pyGHDL/dom/formatting')
-rw-r--r--pyGHDL/dom/formatting/prettyprint.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py
index cdb1964c0..13f18f729 100644
--- a/pyGHDL/dom/formatting/prettyprint.py
+++ b/pyGHDL/dom/formatting/prettyprint.py
@@ -3,6 +3,7 @@ from typing import List, Union
from pydecor import export
from pyGHDL.dom.Misc import Alias
+from pyGHDL.dom.Subprogram import Procedure
from pyGHDL.dom.Type import IntegerType, SubType
from pyVHDLModel.VHDLModel import (
GenericInterfaceItem,
@@ -345,11 +346,22 @@ class PrettyPrint:
name=item.Name,
)
)
+ elif isinstance(item, Procedure):
+ buffer.append(
+ "{prefix}- procedure {name}".format(
+ prefix=prefix,
+ name=item.Name,
+ )
+ )
elif isinstance(item, Component):
for line in self.formatComponent(item, level):
buffer.append(line)
else:
- raise PrettyPrintException("Unhandled declared item kind.")
+ raise PrettyPrintException(
+ "Unhandled declared item kind '{name}'.".format(
+ name=item.__class__.__name__
+ )
+ )
return buffer