aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/formatting
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-21 15:48:35 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-22 12:26:59 +0200
commited99fae7f13db8d5c3e95e935e32db825313b56a (patch)
tree2e58bf9b63f3e3214fc00cda3e8368697539b56b /pyGHDL/dom/formatting
parentec37f2b5efe56d442ea51d3e10d16742f3cd4bce (diff)
downloadghdl-ed99fae7f13db8d5c3e95e935e32db825313b56a.tar.gz
ghdl-ed99fae7f13db8d5c3e95e935e32db825313b56a.tar.bz2
ghdl-ed99fae7f13db8d5c3e95e935e32db825313b56a.zip
Prepared handling of functions, types, subtypes and aliases.
Diffstat (limited to 'pyGHDL/dom/formatting')
-rw-r--r--pyGHDL/dom/formatting/prettyprint.py19
1 files changed, 17 insertions, 2 deletions
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.")