Lexer class for turning a template into a list of tokens
在文件 template.cpp 第 4805 行定义.
在文件 template.cpp 第 4831 行定义.
4848 int state=StateText;
4852 bool emptyOutputLine=
TRUE;
4855 int markStartPos=-1;
4856 for (;(c=*p);p++,pos++)
4863 state=StateBeginTemplate;
4865 else if (c!=
' ' && c!=
'\t' && c!=
'\n')
4867 emptyOutputLine=
FALSE;
4870 case StateBeginTemplate:
4884 state=StateMaybeVar;
4888 state=StateVariable;
4894 emptyOutputLine=
FALSE;
4915 emptyOutputLine ? startLinePos : markStartPos,
4919 lastTokenPos = pos+1;
4939 state=StateEndComment;
4942 case StateEndComment:
4948 emptyOutputLine ? startLinePos : markStartPos,
4950 lastTokenPos = pos+1;
4974 state=StateVariable;
4979 emptyOutputLine=
FALSE;
4987 state=StateEndVariable;
4990 case StateEndVariable:
4996 emptyOutputLine ? startLinePos : markStartPos,
5000 lastTokenPos = pos+1;
5009 state=StateVariable;
5019 if (markStartPos!=-1 && emptyOutputLine) lastTokenPos = startLinePos;
5023 emptyOutputLine=
TRUE;
5026 if (lastTokenPos<pos)
引用了 addToken(), TemplateToken::Block, QCString::data(), FALSE, QCString::isEmpty(), m_closeChar, m_data, m_engine, m_fileName, m_openChar, TemplateEngine::printIncludeContext(), TemplateToken::Text, TRUE, TemplateToken::Variable , 以及 warn().
被这些函数引用 TemplateImpl::TemplateImpl().