aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/formatting
diff options
context:
space:
mode:
Diffstat (limited to 'pyGHDL/dom/formatting')
-rw-r--r--pyGHDL/dom/formatting/prettyprint.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py
index 1577edca0..8f95a412e 100644
--- a/pyGHDL/dom/formatting/prettyprint.py
+++ b/pyGHDL/dom/formatting/prettyprint.py
@@ -2,6 +2,7 @@ from typing import List, Union
from pydecor import export
+from pyGHDL.dom.Type import IntegerType, SubType
from pyVHDLModel.VHDLModel import (
GenericInterfaceItem,
NamedEntity,
@@ -293,6 +294,23 @@ class PrettyPrint:
else "",
)
)
+ elif isinstance(item, IntegerType):
+ buffer.append(
+ "{prefix}- type {name} is range {range}".format(
+ prefix=prefix,
+ name=item.Name,
+ range="{left!s} to {right!s}".format(
+ left=item.LeftBound, right=item.RightBound
+ ),
+ )
+ )
+ elif isinstance(item, SubType):
+ buffer.append(
+ "{prefix}- subtype {name} is ?????".format(
+ prefix=prefix,
+ name=item.Name,
+ )
+ )
else:
raise PrettyPrintException("Unhandled declared item kind.")