Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
4082{
4084 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4085 DBG_CTX((stderr,
"***parseCode() exBlock=%d exName=%s fd=%p scopeName=%s searchCtx=%s\n",
4088
4089 if (s.isEmpty()) return;
4090
4093
4094 od.stripCodeComments(stripCodeComments);
4095 yyextra->code = &od;
4096 yyextra->inputString = s.data();
4099 yyextra->inputPosition = 0;
4100 codeYYrestart(nullptr,yyscanner);
4101 yyextra->currentFontClass = nullptr;
4102 yyextra->searchCtx = options.
searchCtx();
4104 yyextra->inFunctionTryBlock =
FALSE;
4105 yyextra->symbolResolver.setFileScope(options.
fileDef());
4106 yyextra->foldStack.clear();
4107 yyextra->insideSpecialComment = false;
4110 yyextra->curlyCount = 0;
4111 yyextra->bodyCurlyCount = 0;
4112 yyextra->bracketCount = 0;
4113 yyextra->sharpCount = 0;
4114 yyextra->insideTemplate =
FALSE;
4115 yyextra->theCallContext.clear();
4116 while (!yyextra->scopeStack.empty()) yyextra->scopeStack.pop();
4117 yyextra->scopeName = scopeName;
4119 yyextra->exampleBlock = options.
isExample();
4121 yyextra->sourceFileDef = options.
fileDef();
4123 if (options.
fileDef()==
nullptr)
4124 {
4125
4127 yyextra->sourceFileDef = yyextra->exampleFileDef.get();
4128 }
4129 yyextra->lang = lang;
4130 yyextra->insideObjC = lang==SrcLangExt::ObjC;
4131 if (yyextra->sourceFileDef)
4132 {
4134 }
4136 yyextra->currentMemberDef = nullptr;
4137 yyextra->searchingForBody = options.
isExample();
4138 yyextra->insideBody =
FALSE;
4139 yyextra->bracketCount = 0;
4140 if (!yyextra->exampleName.isEmpty())
4141 {
4143 DBG_CTX((stderr,
"yyextra->exampleFile=%s\n",
qPrint(yyextra->exampleFile)));
4144 }
4147 if (!yyextra->insideCodeLine)
4148 {
4150 }
4151 yyextra->type.clear();
4152 yyextra->name.clear();
4153 yyextra->args.clear();
4154 yyextra->parmName.clear();
4155 yyextra->parmType.clear();
4157 BEGIN( Body );
4158 codeYYlex(yyscanner);
4159 yyextra->lexInit=
TRUE;
4160 if (yyextra->insideCodeLine)
4161 {
4163 }
4165 {
4166 while (!yyextra->foldStack.empty())
4167 {
4168 yyextra->code->endFold();
4169 yyextra->foldStack.pop_back();
4170 }
4171 }
4172 if (yyextra->exampleFileDef)
4173 {
4174
4175 yyextra->exampleFileDef.reset();
4176 yyextra->sourceFileDef=nullptr;
4177 }
4178
4179 yyextra->tooltipManager.writeTooltips(od);
4180}
virtual const QCString & name() const =0
virtual QCString absFilePath() const =0
virtual QCString fileName() const =0
bool isEmpty() const
Returns TRUE iff the string is empty.
static void endCodeLine(yyscan_t yyscanner)
static void startCodeLine(yyscan_t yyscanner)
static int countLines(yyscan_t yyscanner)
static void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor)
static void setParameterList(yyscan_t yyscanner, const MemberDef *md)
#define Config_getBool(name)
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
NamespaceDef * getResolvedNamespace(const QCString &name)
const char * qPrint(const char *s)
const Definition * searchCtx() const
const FileDef * fileDef() const
const MemberDef * memberDef() const
bool showLineNumbers() const
bool inlineFragment() const
QCString exampleName() const
bool collectXRefs() const
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)