From 4280385c83d349906e799cf0f32e6e7a4a491124 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 30 Nov 2022 23:29:04 +0100 Subject: Collect multiline comments with linebreaks. --- pyGHDL/dom/_Utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pyGHDL') diff --git a/pyGHDL/dom/_Utils.py b/pyGHDL/dom/_Utils.py index b61168418..10053db6e 100644 --- a/pyGHDL/dom/_Utils.py +++ b/pyGHDL/dom/_Utils.py @@ -91,12 +91,13 @@ def GetNameOfNode(node: Iir) -> str: def GetDocumentationOfNode(node: Iir) -> str: file = files_map.Location_To_File(nodes.Get_Location(node)) idx = file_comments.Find_First_Comment(file, node) - documentation = "" + documentation = [] while idx != file_comments.No_Comment_Index: - documentation += file_comments.Get_Comment(file, idx) + documentation.append(file_comments.Get_Comment(file, idx)) idx = file_comments.Get_Next_Comment(file, idx) - return documentation + return "\n".join(documentation) + @export def GetModeOfNode(node: Iir) -> Mode: -- cgit v1.2.3