summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-09-02 19:15:32 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-09-02 19:15:32 (GMT)
commit6bedd287437d2091820129533cb44f56609d0991 (patch)
tree05d18b9500cfc4e613b19d0154b89ed18542a3ae /src/docparser.cpp
parent115c6c02c3b246c525721aef9b1a43aeeb4666d5 (diff)
downloadDoxygen-6bedd287437d2091820129533cb44f56609d0991.zip
Doxygen-6bedd287437d2091820129533cb44f56609d0991.tar.gz
Doxygen-6bedd287437d2091820129533cb44f56609d0991.tar.bz2
Release-1.5.3-20070902
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp48
1 files changed, 43 insertions, 5 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index dff6940..1ada917 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -3798,9 +3798,10 @@ int DocSimpleSect::parseRcs()
m_title = new DocTitle(this);
m_title->parseFromString(g_token->name);
- docParserPushContext();
- internalValidatingParseDoc(this,m_children,g_token->text);
- docParserPopContext();
+ QString text = g_token->text;
+ docParserPushContext(); // this will create a new g_token
+ internalValidatingParseDoc(this,m_children,text);
+ docParserPopContext(); // this will restore the old g_token
DBG(("DocSimpleSect::parseRcs()\n"));
DocNode *n=g_nodeStack.pop();
@@ -5455,7 +5456,16 @@ reparsetoken:
// so a new simple section will be started at this level.
// This is the same as unputting the last read token and continuing.
g_token->name = g_token->simpleSectName;
- tok = TK_COMMAND;
+ if (g_token->name.left(4)=="rcs:") // RCS section
+ {
+ g_token->name = g_token->name.mid(4);
+ g_token->text = g_token->simpleSectText;
+ tok = TK_RCSTAG;
+ }
+ else // other section
+ {
+ tok = TK_COMMAND;
+ }
DBG(("reparsing command %s\n",g_token->name.data()));
goto reparsetoken;
}
@@ -5545,7 +5555,16 @@ reparsetoken:
// so a new simple section will be started at this level.
// This is the same as unputting the last read token and continuing.
g_token->name = g_token->simpleSectName;
- tok = TK_COMMAND;
+ if (g_token->name.left(4)=="rcs:") // RCS section
+ {
+ g_token->name = g_token->name.mid(4);
+ g_token->text = g_token->simpleSectText;
+ tok = TK_RCSTAG;
+ }
+ else // other section
+ {
+ tok = TK_COMMAND;
+ }
DBG(("reparsing command %s\n",g_token->name.data()));
goto reparsetoken;
}
@@ -5608,6 +5627,25 @@ reparsetoken:
goto endparagraph;
case TK_RCSTAG:
{
+ DocNode *n=parent();
+ while (n &&
+ n->kind()!=DocNode::Kind_SimpleSect &&
+ n->kind()!=DocNode::Kind_ParamSect
+ )
+ {
+ n=n->parent();
+ }
+ if (n) // already in a simple section
+ {
+ // simple section cannot start in this paragraph, need
+ // to unwind the stack and remember the command.
+ g_token->simpleSectName = "rcs:"+g_token->name;
+ g_token->simpleSectText = g_token->text;
+ retval=RetVal_SimpleSec;
+ goto endparagraph;
+ }
+
+ // see if we are in a simple list
DocSimpleSect *ss=new DocSimpleSect(this,DocSimpleSect::Rcs);
m_children.append(ss);
ss->parseRcs();