Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
4093{
4095 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4096 DBG_CTX((stderr,
"***parseCode() exBlock=%d exName=%s fd=%p scopeName=%s searchCtx=%s\n",
4099
4100 if (s.isEmpty()) return;
4101
4104
4105 od.stripCodeComments(stripCodeComments);
4106 yyextra->code = &od;
4107 yyextra->inputString = s.data();
4110 yyextra->inputPosition = 0;
4111 codeYYrestart(nullptr,yyscanner);
4112 yyextra->currentFontClass = nullptr;
4113 yyextra->searchCtx = options.
searchCtx();
4115 yyextra->inFunctionTryBlock =
FALSE;
4116 yyextra->symbolResolver.setFileScope(options.
fileDef());
4117 yyextra->foldStack.clear();
4118 yyextra->insideSpecialComment = false;
4121 yyextra->curlyCount = 0;
4122 yyextra->bodyCurlyCount = 0;
4123 yyextra->bracketCount = 0;
4124 yyextra->sharpCount = 0;
4125 yyextra->insideTemplate =
FALSE;
4126 yyextra->theCallContext.clear();
4127 while (!yyextra->scopeStack.empty()) yyextra->scopeStack.pop();
4128 yyextra->scopeName = scopeName;
4130 yyextra->exampleBlock = options.
isExample();
4132 yyextra->sourceFileDef = options.
fileDef();
4134 if (options.
fileDef()==
nullptr)
4135 {
4136
4138 yyextra->sourceFileDef = yyextra->exampleFileDef.get();
4139 }
4140 yyextra->lang = lang;
4141 yyextra->insideObjC = lang==SrcLangExt::ObjC;
4142 if (yyextra->sourceFileDef)
4143 {
4145 }
4147 yyextra->currentMemberDef = nullptr;
4148 yyextra->searchingForBody = options.
isExample();
4149 yyextra->insideBody =
FALSE;
4150 yyextra->bracketCount = 0;
4151 if (!yyextra->exampleName.isEmpty())
4152 {
4154 DBG_CTX((stderr,
"yyextra->exampleFile=%s\n",
qPrint(yyextra->exampleFile)));
4155 }
4158 if (!yyextra->insideCodeLine)
4159 {
4161 }
4162 yyextra->type.clear();
4163 yyextra->name.clear();
4164 yyextra->args.clear();
4165 yyextra->parmName.clear();
4166 yyextra->parmType.clear();
4168 BEGIN( Body );
4169 codeYYlex(yyscanner);
4170 yyextra->lexInit=
TRUE;
4171 if (yyextra->insideCodeLine)
4172 {
4174 }
4176 {
4177 while (!yyextra->foldStack.empty())
4178 {
4179 yyextra->code->endFold();
4180 yyextra->foldStack.pop_back();
4181 }
4182 }
4183 if (yyextra->exampleFileDef)
4184 {
4185
4186 yyextra->exampleFileDef.reset();
4187 yyextra->sourceFileDef=nullptr;
4188 }
4189
4190 yyextra->tooltipManager.writeTooltips(od);
4191}
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)