From ad34fac3f4e30f0ff13e1630b42373f31b2918a4 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 21 Jun 2021 21:44:31 +0200 Subject: Fixed function call parameters. Fixed physical literal units. Added basic Procedure detection. --- pyGHDL/dom/formatting/prettyprint.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'pyGHDL/dom/formatting') 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 -- cgit v1.2.3