|
LLVM 22.0.0git
|
Classes | |
| class | AddIndentationStringStream |
| class | ASTNode |
| class | EscapeStringStream |
| struct | MustacheContext |
| class | MustacheOutputStream |
| class | Parser |
| class | RawMustacheOutputStream |
| struct | Tag |
| class | Template |
| class | Token |
Typedefs | |
| using | Lambda = std::function<llvm::json::Value()> |
| using | SectionLambda = std::function<llvm::json::Value(std::string)> |
| using | AstPtr = ASTNode * |
| using | EscapeMap = DenseMap<char, std::string> |
| using | ASTNodeList = iplist<ASTNode> |
Functions | |
| static AstPtr | createRootNode (MustacheContext &Ctx) |
| static AstPtr | createNode (MustacheContext &Ctx, ASTNode::Type T, ArrayRef< StringRef > A, ASTNode *Parent) |
| static AstPtr | createTextNode (MustacheContext &Ctx, StringRef Body, ASTNode *Parent) |
| static bool | hasTextBehind (size_t Idx, const ArrayRef< Token > &Tokens) |
| static bool | hasTextAhead (size_t Idx, const ArrayRef< Token > &Tokens) |
| static bool | requiresCleanUp (Token::Type T) |
| static void | stripTokenAhead (SmallVectorImpl< Token > &Tokens, size_t Idx) |
| void | stripTokenBefore (SmallVectorImpl< Token > &Tokens, size_t Idx, Token &CurrentToken, Token::Type CurrentType) |
| static const char * | tagKindToString (Tag::Kind K) |
| static const char * | jsonKindToString (json::Value::Kind K) |
| static SmallVector< Token > | tokenize (StringRef Template, MustacheContext &Ctx) |
| static void | toMustacheString (const json::Value &Data, raw_ostream &OS) |
| using llvm::mustache::ASTNodeList = iplist<ASTNode> |
Definition at line 91 of file Mustache.h.
| using llvm::mustache::AstPtr = ASTNode * |
Definition at line 89 of file Mustache.h.
| typedef DenseMap< char, std::string > llvm::mustache::EscapeMap = DenseMap<char, std::string> |
Definition at line 90 of file Mustache.h.
| using llvm::mustache::Lambda = std::function<llvm::json::Value()> |
Definition at line 85 of file Mustache.h.
| using llvm::mustache::SectionLambda = std::function<llvm::json::Value(std::string)> |
Definition at line 86 of file Mustache.h.
|
static |
Definition at line 257 of file Mustache.cpp.
|
static |
Definition at line 253 of file Mustache.cpp.
Referenced by llvm::mustache::Parser::parse().
|
static |
Definition at line 262 of file Mustache.cpp.
Definition at line 295 of file Mustache.cpp.
References getType(), 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 279 of file Mustache.cpp.
References llvm::StringRef::empty(), llvm::StringRef::ends_with(), getType(), llvm::mustache::Token::RawBody, llvm::StringRef::rtrim(), and llvm::mustache::Token::Text.
Referenced by tokenize().
|
static |
Definition at line 372 of file Mustache.cpp.
References llvm::json::Value::Array, llvm::json::Value::Boolean, llvm_unreachable, llvm::json::Value::Null, llvm::json::Value::Number, llvm::json::Value::Object, and llvm::json::Value::String.
Referenced by toMustacheString().
|
static |
Definition at line 308 of file Mustache.cpp.
References llvm::mustache::Token::Comment, llvm::mustache::Token::InvertSectionOpen, llvm::mustache::Token::Partial, llvm::mustache::Token::SectionClose, llvm::mustache::Token::SectionOpen, llvm::mustache::Token::SetDelimiter, and T.
Referenced by tokenize().
|
static |
Definition at line 321 of file Mustache.cpp.
References llvm::StringRef::starts_with(), 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 337 of file Mustache.cpp.
References llvm::StringRef::rtrim(), llvm::mustache::Token::setIndentation(), llvm::StringRef::size(), and llvm::mustache::Token::TokenBody.
Referenced by tokenize().
Definition at line 360 of file Mustache.cpp.
References llvm_unreachable, llvm::mustache::Tag::None, llvm::mustache::Tag::Normal, and llvm::mustache::Tag::Triple.
Referenced by tokenize().
|
static |
Definition at line 391 of file Mustache.cpp.
References llvm::CallingConv::C, llvm::dbgs(), llvm::StringRef::drop_front(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::StringRef::empty(), llvm::StringRef::front(), llvm::mustache::Token::getType(), hasTextAhead(), hasTextBehind(), LLVM_DEBUG, llvm::mustache::Tag::Normal, llvm::StringRef::npos, requiresCleanUp(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::StringRef::size(), llvm::StringRef::split(), llvm::StringRef::starts_with(), stripTokenAhead(), stripTokenBefore(), tagKindToString(), llvm::StringRef::take_until(), llvm::StringRef::trim(), and llvm::mustache::Tag::Triple.
Referenced by llvm::mustache::Parser::parse().
|
static |
Definition at line 663 of file Mustache.cpp.
References llvm::json::Value::Array, llvm::json::Value::Boolean, llvm::Data, llvm::dbgs(), jsonKindToString(), LLVM_DEBUG, llvm::json::Value::Null, llvm::json::Value::Number, llvm::json::Value::Object, llvm::json::Value::String, and llvm::json::OStream::value().