From 7cd998a90790d4678d7a59f6774c60dc6aff4b98 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 21 Oct 2019 15:27:01 +0200 Subject: Small improvements of TCL output Undoing changes for (due to problems with doxygen tests): - in case of `##` comment blocks the last line was not always show - in case of multiple comment blocks, properly separate them --- src/tclscanner.l | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/tclscanner.l b/src/tclscanner.l index f09c481..60ba6d4 100644 --- a/src/tclscanner.l +++ b/src/tclscanner.l @@ -1460,16 +1460,19 @@ tcl_inf("<- %s\n",text); } else if (what==1) { // start new comment + if (tcl.comment) + { + tcl_comment(99,""); // inbody + } tcl.string_comment=text; - tcl_comment(99,""); - tcl.string_comment=""; tcl.comment=1; } else if (what==2) { // add to comment - tcl.string_comment=text; - tcl_comment(99,""); - tcl.string_comment=""; + if (tcl.comment) + { + tcl.string_comment+=text; + } } else if (what==-1 || what == -2) { // end of comment without/with command @@ -1548,7 +1551,6 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment); myEntry1=tcl_entry_namespace(tcl.scan.at(0)->ns); } processedDoc = preprocessCommentBlock(myDoc,tcl.file_name,myLine0); - if (!myEntry1->doc.isEmpty() && tcl.comment==0) processedDoc = "
" + processedDoc; // to separate comment blocks parseCommentBlock(tcl.this_parser, myEntry1, processedDoc, tcl.file_name, myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); } @@ -1571,7 +1573,6 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment); myEntry1=tcl_entry_namespace(tcl.scan.at(0)->ns); } processedDoc = preprocessCommentBlock(myDoc,tcl.file_name,myLine0); - if (!myEntry1->doc.isEmpty() && tcl.comment==0) processedDoc = "
" + processedDoc; // to separate comment blocks parseCommentBlock(tcl.this_parser, myEntry1, processedDoc, tcl.file_name, myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); } -- cgit v0.12