From ed99fae7f13db8d5c3e95e935e32db825313b56a Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 21 Jun 2021 15:48:35 +0200 Subject: Prepared handling of functions, types, subtypes and aliases. --- pyGHDL/dom/formatting/prettyprint.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'pyGHDL/dom/formatting') diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py index 8f95a412e..afbcbb851 100644 --- a/pyGHDL/dom/formatting/prettyprint.py +++ b/pyGHDL/dom/formatting/prettyprint.py @@ -2,16 +2,17 @@ from typing import List, Union from pydecor import export +from pyGHDL.dom.Misc import Alias from pyGHDL.dom.Type import IntegerType, SubType from pyVHDLModel.VHDLModel import ( GenericInterfaceItem, NamedEntity, PortInterfaceItem, - WithDefaultExpression, + WithDefaultExpression, Function, ) from pyGHDL import GHDLBaseException -from pyGHDL.dom.Misc import Document, Design, Library +from pyGHDL.dom.NonStandard import Document, Design, Library from pyGHDL.dom.DesignUnit import ( Entity, Architecture, @@ -311,6 +312,20 @@ class PrettyPrint: name=item.Name, ) ) + elif isinstance(item, Alias): + buffer.append( + "{prefix}- alias {name} is ?????".format( + prefix=prefix, + name=item.Name, + ) + ) + elif isinstance(item, Function): + buffer.append( + "{prefix}- function {name}".format( + prefix=prefix, + name=item.Name, + ) + ) else: raise PrettyPrintException("Unhandled declared item kind.") -- cgit v1.2.3