diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-12-03 19:54:36 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-12-03 19:54:36 (GMT) |
commit | 3bda58a7b7b4f9094c2fcb2bad71c7174367605e (patch) | |
tree | 6b71e41e85f4dfd8822e2734c73bf7ff64b1fe35 /src/code.l | |
parent | 9b14bf58c30a02ef19abebec280568532dc58ed4 (diff) | |
download | Doxygen-3bda58a7b7b4f9094c2fcb2bad71c7174367605e.zip Doxygen-3bda58a7b7b4f9094c2fcb2bad71c7174367605e.tar.gz Doxygen-3bda58a7b7b4f9094c2fcb2bad71c7174367605e.tar.bz2 |
Split language parser into "outline parser" and "code parser"
Diffstat (limited to 'src/code.l')
-rw-r--r-- | src/code.l | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -3861,25 +3861,23 @@ static void restoreObjCContext(yyscan_t yyscanner) } } -struct CodeScanner::Private +struct CCodeParser::Private { yyscan_t yyscanner; codeYY_state state; }; -CodeScanner::CodeScanner() +CCodeParser::CCodeParser() : p(std::make_unique<CCodeParser::Private>()) { - p = new Private; codeYYlex_init_extra(&p->state,&p->yyscanner); } -CodeScanner::~CodeScanner() +CCodeParser::~CCodeParser() { codeYYlex_destroy(p->yyscanner); - delete p; } -void CodeScanner::reset() +void CCodeParser::resetCodeParserState() { struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner; //printf("***CodeParser::reset()\n"); @@ -3895,7 +3893,7 @@ void CodeScanner::reset() yyextra->anchorCount = 0; } -void CodeScanner::parseCCode(CodeOutputInterface &od,const char *className,const QCString &s, +void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const QCString &s, SrcLangExt lang,bool exBlock, const char *exName,FileDef *fd, int startLine,int endLine,bool inlineFragment, const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx, @@ -3912,7 +3910,7 @@ void CodeScanner::parseCCode(CodeOutputInterface &od,const char *className,const if (yyextra->codeClassSDict==0) { - reset(); + resetCodeParserState(); } yyextra->code = &od; yyextra->inputString = s; |