LLVM 22.0.0git
|
Classes | |
class | AddIndentationStringStream |
class | ASTNode |
class | EscapeStringStream |
class | Parser |
class | Template |
class | Token |
Typedefs | |
using | Lambda = std::function< llvm::json::Value()> |
using | SectionLambda = std::function< llvm::json::Value(std::string)> |
using | AstPtr = std::unique_ptr< ASTNode > |
using | EscapeMap = DenseMap< char, std::string > |
using llvm::mustache::AstPtr = typedef std::unique_ptr<ASTNode> |
Definition at line 87 of file Mustache.h.
using llvm::mustache::EscapeMap = typedef DenseMap<char, std::string> |
Definition at line 119 of file Mustache.cpp.
using llvm::mustache::Lambda = typedef std::function<llvm::json::Value()> |
Definition at line 83 of file Mustache.h.
using llvm::mustache::SectionLambda = typedef std::function<llvm::json::Value(std::string)> |
Definition at line 84 of file Mustache.h.
AstPtr llvm::mustache::createNode | ( | ASTNode::Type | T, |
Accessor | A, | ||
ASTNode * | Parent, | ||
llvm::StringMap< AstPtr > & | Partials, | ||
llvm::StringMap< Lambda > & | Lambdas, | ||
llvm::StringMap< SectionLambda > & | SectionLambdas, | ||
EscapeMap & | Escapes | ||
) |
Definition at line 199 of file Mustache.cpp.
References A.
AstPtr llvm::mustache::createRootNode | ( | llvm::StringMap< AstPtr > & | Partials, |
llvm::StringMap< Lambda > & | Lambdas, | ||
llvm::StringMap< SectionLambda > & | SectionLambdas, | ||
EscapeMap & | Escapes | ||
) |
Definition at line 192 of file Mustache.cpp.
Referenced by llvm::mustache::Parser::parse().
AstPtr llvm::mustache::createTextNode | ( | std::string | Body, |
ASTNode * | Parent, | ||
llvm::StringMap< AstPtr > & | Partials, | ||
llvm::StringMap< Lambda > & | Lambdas, | ||
llvm::StringMap< SectionLambda > & | SectionLambdas, | ||
EscapeMap & | Escapes | ||
) |
Definition at line 208 of file Mustache.cpp.
Definition at line 245 of file Mustache.cpp.
References getType(), Idx, llvm::StringRef::ltrim(), llvm::mustache::Token::RawBody, llvm::ArrayRef< T >::size(), llvm::StringRef::starts_with(), and llvm::mustache::Token::Text.
Referenced by tokenize().
Definition at line 229 of file Mustache.cpp.
References llvm::StringRef::empty(), llvm::StringRef::ends_with(), getType(), Idx, llvm::mustache::Token::RawBody, llvm::StringRef::rtrim(), and llvm::mustache::Token::Text.
Referenced by tokenize().
bool llvm::mustache::requiresCleanUp | ( | Token::Type | T | ) |
Definition at line 258 of file Mustache.cpp.
References llvm::mustache::Token::Comment, llvm::mustache::Token::InvertSectionOpen, llvm::mustache::Token::Partial, llvm::mustache::Token::SectionClose, and llvm::mustache::Token::SectionOpen.
Referenced by tokenize().
void llvm::mustache::stripTokenAhead | ( | SmallVectorImpl< Token > & | Tokens, |
size_t | Idx | ||
) |
Definition at line 271 of file Mustache.cpp.
References Idx, llvm::StringRef::starts_with(), llvm::StringRef::str(), llvm::StringRef::substr(), and llvm::mustache::Token::TokenBody.
Referenced by tokenize().
void llvm::mustache::stripTokenBefore | ( | SmallVectorImpl< Token > & | Tokens, |
size_t | Idx, | ||
Token & | CurrentToken, | ||
Token::Type | CurrentType | ||
) |
Definition at line 289 of file Mustache.cpp.
References Idx, llvm::mustache::Token::Partial, llvm::StringRef::rtrim(), llvm::mustache::Token::setIndentation(), llvm::StringRef::size(), llvm::StringRef::str(), and llvm::mustache::Token::TokenBody.
Referenced by tokenize().
SmallVector< Token > llvm::mustache::tokenize | ( | StringRef | Template | ) |
Definition at line 304 of file Mustache.cpp.
References llvm::SmallVectorImpl< T >::emplace_back(), End, llvm::mustache::Token::getType(), hasTextAhead(), hasTextBehind(), Idx, llvm::StringRef::npos, requiresCleanUp(), llvm::SmallVectorBase< Size_T >::size(), llvm::StringRef::size(), llvm::StringRef::str(), stripTokenAhead(), and stripTokenBefore().
Referenced by llvm::mustache::Parser::parse().
void llvm::mustache::toMustacheString | ( | const json::Value & | Data, |
raw_ostream & | OS | ||
) |
Definition at line 537 of file Mustache.cpp.
References llvm::json::Value::Array, llvm::json::Value::Boolean, llvm::Data, llvm::json::Value::Null, llvm::json::Value::Number, llvm::json::Value::Object, OS, llvm::json::Value::String, and llvm::json::OStream::value().
Referenced by llvm::mustache::ASTNode::render().