My Project
|
Parser for templates. More...
Public Member Functions | |
TemplateParser (const TemplateEngine *engine, const QCString &templateName, QList< TemplateToken > &tokens) | |
void | parse (TemplateNode *parent, int line, const QStrList &stopAt, QList< TemplateNode > &nodes) |
bool | hasNextToken () const |
TemplateToken * | takeNextToken () |
void | removeNextToken () |
void | prependToken (const TemplateToken *token) |
const TemplateToken * | currentToken () const |
QCString | templateName () const |
void | warn (const char *fileName, int line, const char *fmt,...) const |
Private Attributes | |
const TemplateEngine * | m_engine |
QCString | m_templateName |
QList< TemplateToken > & | m_tokens |
Parser for templates.
Definition at line 1724 of file template.cpp.
TemplateParser::TemplateParser | ( | const TemplateEngine * | engine, |
const QCString & | templateName, | ||
QList< TemplateToken > & | tokens | ||
) |
Definition at line 4882 of file template.cpp.
const TemplateToken * TemplateParser::currentToken | ( | ) | const |
bool TemplateParser::hasNextToken | ( | ) | const |
void TemplateParser::parse | ( | TemplateNode * | parent, |
int | line, | ||
const QStrList & | stopAt, | ||
QList< TemplateNode > & | nodes | ||
) |
Definition at line 4889 of file template.cpp.
References TemplateToken::Block, TemplateToken::data, hasNextToken(), TemplateNodeFactory::instance(), TemplateToken::line, m_templateName, prependToken(), takeNextToken(), TemplateToken::Text, TRACE, TemplateToken::type, TemplateToken::Variable, and warn().
Referenced by TemplateImpl::TemplateImpl(), TemplateNodeBlock::TemplateNodeBlock(), TemplateNodeEncoding::TemplateNodeEncoding(), TemplateNodeExtend::TemplateNodeExtend(), TemplateNodeFor::TemplateNodeFor(), TemplateNodeIf::TemplateNodeIf(), TemplateNodeMarkers::TemplateNodeMarkers(), TemplateNodeMsg::TemplateNodeMsg(), TemplateNodeRange::TemplateNodeRange(), TemplateNodeRepeat::TemplateNodeRepeat(), TemplateNodeSpaceless::TemplateNodeSpaceless(), TemplateNodeTabbing::TemplateNodeTabbing(), TemplateNodeTree::TemplateNodeTree(), and TemplateNodeWith::TemplateNodeWith().
void TemplateParser::prependToken | ( | const TemplateToken * | token | ) |
void TemplateParser::removeNextToken | ( | ) |
Definition at line 4984 of file template.cpp.
References m_tokens.
Referenced by TemplateNodeBlock::TemplateNodeBlock(), TemplateNodeEncoding::TemplateNodeEncoding(), TemplateNodeFor::TemplateNodeFor(), TemplateNodeIf::TemplateNodeIf(), TemplateNodeMarkers::TemplateNodeMarkers(), TemplateNodeMsg::TemplateNodeMsg(), TemplateNodeRange::TemplateNodeRange(), TemplateNodeRepeat::TemplateNodeRepeat(), TemplateNodeSpaceless::TemplateNodeSpaceless(), TemplateNodeTabbing::TemplateNodeTabbing(), TemplateNodeTree::TemplateNodeTree(), and TemplateNodeWith::TemplateNodeWith().
TemplateToken * TemplateParser::takeNextToken | ( | ) |
Definition at line 4974 of file template.cpp.
References m_tokens.
Referenced by parse(), TemplateNodeFor::TemplateNodeFor(), and TemplateNodeIf::TemplateNodeIf().
|
inline |
Definition at line 1736 of file template.cpp.
References m_templateName.
Referenced by ExpressionParser::getNextToken(), ExpressionParser::parseNotExpression(), ExpressionParser::parsePrimaryExpression(), TemplateNodeBlock::TemplateNodeBlock(), TemplateNodeCloseSubIndex::TemplateNodeCloseSubIndex(), TemplateNodeCycle::TemplateNodeCycle(), TemplateNodeIndexEntry::TemplateNodeIndexEntry(), TemplateNodeOpenSubIndex::TemplateNodeOpenSubIndex(), and TemplateNodeWith::TemplateNodeWith().
void TemplateParser::warn | ( | const char * | fileName, |
int | line, | ||
const char * | fmt, | ||
... | |||
) | const |
Definition at line 4994 of file template.cpp.
References m_engine, TemplateEngine::printIncludeContext(), and va_warn().
Referenced by parse(), TemplateNodeBlock::TemplateNodeBlock(), TemplateNodeCloseSubIndex::TemplateNodeCloseSubIndex(), TemplateNodeCreate::TemplateNodeCreate(), TemplateNodeCycle::TemplateNodeCycle(), TemplateNodeEncoding::TemplateNodeEncoding(), TemplateNodeExtend::TemplateNodeExtend(), TemplateNodeFor::TemplateNodeFor(), TemplateNodeIf::TemplateNodeIf(), TemplateNodeInclude::TemplateNodeInclude(), TemplateNodeIndexEntry::TemplateNodeIndexEntry(), TemplateNodeMarkers::TemplateNodeMarkers(), TemplateNodeOpenSubIndex::TemplateNodeOpenSubIndex(), TemplateNodeRange::TemplateNodeRange(), TemplateNodeResource::TemplateNodeResource(), TemplateNodeTree::TemplateNodeTree(), TemplateNodeVariable::TemplateNodeVariable(), and TemplateNodeWith::TemplateNodeWith().
|
private |
Definition at line 1739 of file template.cpp.
Referenced by warn().
|
private |
Definition at line 1740 of file template.cpp.
Referenced by parse(), and templateName().
|
private |
Definition at line 1741 of file template.cpp.
Referenced by currentToken(), hasNextToken(), prependToken(), removeNextToken(), and takeNextToken().