summaryrefslogtreecommitdiffstats
path: root/src/vhdljjparser.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2018-05-01 17:25:32 (GMT)
committerGitHub <noreply@github.com>2018-05-01 17:25:32 (GMT)
commitcbe790f19cc89478fa1f981fd4dc06afa73a02ba (patch)
tree8b5de7b49ad7a1f01b073037f36b18d04710a40f /src/vhdljjparser.cpp
parentd50acc2b7161fdee0c5a4a988d3f58c6f888420f (diff)
parent1431d16ca2a8a20a72f029b48e4b178aa59009e3 (diff)
downloadDoxygen-cbe790f19cc89478fa1f981fd4dc06afa73a02ba.zip
Doxygen-cbe790f19cc89478fa1f981fd4dc06afa73a02ba.tar.gz
Doxygen-cbe790f19cc89478fa1f981fd4dc06afa73a02ba.tar.bz2
Merge pull request #684 from albert-github/feature/bug_794567
Bug 794567 - Doxygen crash when using \code{.markdown}...\endcode in VHDL source
Diffstat (limited to 'src/vhdljjparser.cpp')
-rw-r--r--src/vhdljjparser.cpp104
1 files changed, 0 insertions, 104 deletions
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index 34391b5..706e8db 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -80,7 +80,6 @@ static struct
int iDocLine;
} str_doc;
-static bool doxComment=FALSE; // doxygen comment ?
static QCString strComment;
static int iCodeLen;
static const char *vhdlFileName = 0;
@@ -100,59 +99,6 @@ Entry* getVhdlCompound()
return NULL;
}
-void startCodeBlock(int index)
-{
- int ll=strComment.length();
- if (!gBlock) gBlock = new Entry;
- iCodeLen=inputString.findRev(strComment.data())+ll;
- // fprintf(stderr,"\n startin code..%d %d %d\n",iCodeLen,num_chars,ll);
- gBlock->reset();
- int len=strComment.length();
- QCString name=strComment.right(len-index);//
- name=VhdlDocGen::getIndexWord(name.data(),1);
- if (!name)
- gBlock->name="misc"+ VhdlDocGen::getRecordNumber();
- else
- gBlock->name=name;
-
- gBlock->startLine=yyLineNr;
- gBlock->bodyLine=yyLineNr;
-
- strComment=strComment.left(index);
- VhdlDocGen::prepareComment(strComment);
- gBlock->brief+=strComment;
-}
-
-void makeInlineDoc(int endCode)
-{
- int len=endCode-iCodeLen;
- if (!gBlock) gBlock = new Entry;
- QCString par=inputString.mid(iCodeLen,len);
- //fprintf(stderr,"\n inline code: \n<%s>",par.data());
- gBlock->doc=par;
- gBlock->inbodyDocs=par;
- gBlock->section=Entry::VARIABLE_SEC;
- gBlock->spec=VhdlDocGen::MISCELLANEOUS;
- gBlock->fileName = yyFileName;
- gBlock->endBodyLine=yyLineNr-1;
- gBlock->lang=SrcLangExt_VHDL;
- Entry *temp=new Entry(*gBlock);
- Entry* compound=getVhdlCompound();
-
- if (compound)
- {
- compound->addSubEntry(temp);
- }
- else
- {
- temp->type="misc"; // global code like library ieee...
- VhdlParser::current_root->addSubEntry(temp);
- }
- strComment.resize(0);
- gBlock->reset();
-}// makeInlineDoc
-
-
bool isConstraintFile(const QCString &fileName,const QCString &ext)
{
return fileName.right(ext.length())==ext;
@@ -282,20 +228,6 @@ void VhdlParser::newEntry()
initEntry(current);
}
-bool checkInlineCode(QCString & doc)
-{
- int index=doc.find("\\code");
-
- if (index>0)
- {
- strComment+=doc;
- startCodeBlock(index);
- doxComment=TRUE;
- return true;
- }
- return false;
-}
-
void VhdlParser::handleFlowComment(const char* doc)
{
lineCount(doc);
@@ -313,7 +245,6 @@ void VhdlParser::handleFlowComment(const char* doc)
void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
{
int position=0;
- static bool isIn;
QCString doc;
doc.append(doc1);
// fprintf(stderr,"\n %s",doc.data());
@@ -325,22 +256,6 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
return;
}
- isIn=checkInlineCode(doc);
- bool isEndCode=doc.contains("\\endcode");
- // empty comment --!
- if (isEndCode)
- {
- int end=inputString.find(doc.data(),iCodeLen);
- makeInlineDoc(end);
- strComment.resize(0);
- isIn=false;
- }
- if (isIn)
- {
- isIn=false;
- return;
- }
-
VhdlDocGen::prepareComment(doc);
bool needsEntry=FALSE;
@@ -791,31 +706,12 @@ void VhdlParser::setMultCommentLine()
void VhdlParser::oneLineComment(QCString qcs)
{
- bool isEndCode=qcs.contains("\\endcode");
-
- int index = qcs.find("\\code");
- if (isEndCode)
- {
- int end = inputString.find(qcs.data(),iCodeLen);
- makeInlineDoc(end);
- }
- else if (index > 0)
- {
- // assert(false);
- strComment=qcs;
- startCodeBlock(index);
- strComment.resize(0);
- }
-
- if (!isEndCode && index==-1)
- {
int j=qcs.find("--!");
qcs=qcs.right(qcs.length()-3-j);
if (!checkMultiComment(qcs,iDocLine))
{
handleCommentBlock(qcs,TRUE);
}
- }
}