LLVM 22.0.0git
llvm::mustache::Token Class Reference

Public Types

enum class  Type {
  Text , Variable , Partial , SectionOpen ,
  SectionClose , InvertSectionOpen , UnescapeVariable , Comment ,
  SetDelimiter
}

Public Member Functions

 Token (StringRef Str)
 Token (StringRef RawBody, StringRef TokenBody, char Identifier, MustacheContext &Ctx)
ArrayRef< StringRefgetAccessor () const
Type getType () const
void setIndentation (size_t NewIndentation)
size_t getIndentation () const

Static Public Member Functions

static Type getTokenType (char Identifier)

Public Attributes

Type TokenType
StringRef RawBody
StringRef TokenBody
ArrayRef< StringRefAccessorValue
size_t Indentation

Detailed Description

Definition at line 95 of file Mustache.cpp.

Member Enumeration Documentation

◆ Type

enum class llvm::mustache::Token::Type
strong
Enumerator
Text 
Variable 
Partial 
SectionOpen 
SectionClose 
InvertSectionOpen 
UnescapeVariable 
Comment 
SetDelimiter 

Definition at line 97 of file Mustache.cpp.

Constructor & Destructor Documentation

◆ Token() [1/2]

llvm::mustache::Token::Token ( StringRef Str)
inline

Definition at line 109 of file Mustache.cpp.

References AccessorValue, RawBody, Text, TokenBody, and TokenType.

◆ Token() [2/2]

llvm::mustache::Token::Token ( StringRef RawBody,
StringRef TokenBody,
char Identifier,
MustacheContext & Ctx )
inline

Member Function Documentation

◆ getAccessor()

ArrayRef< StringRef > llvm::mustache::Token::getAccessor ( ) const
inline

Definition at line 125 of file Mustache.cpp.

References AccessorValue.

◆ getIndentation()

size_t llvm::mustache::Token::getIndentation ( ) const
inline

Definition at line 131 of file Mustache.cpp.

References Indentation.

◆ getTokenType()

Type llvm::mustache::Token::getTokenType ( char Identifier)
inlinestatic

Definition at line 133 of file Mustache.cpp.

References Comment, InvertSectionOpen, Partial, SectionClose, SectionOpen, SetDelimiter, UnescapeVariable, and Variable.

Referenced by Token().

◆ getType()

Type llvm::mustache::Token::getType ( ) const
inline

Definition at line 127 of file Mustache.cpp.

References TokenType.

Referenced by llvm::mustache::tokenize().

◆ setIndentation()

void llvm::mustache::Token::setIndentation ( size_t NewIndentation)
inline

Definition at line 129 of file Mustache.cpp.

References Indentation.

Referenced by llvm::mustache::stripTokenBefore().

Member Data Documentation

◆ AccessorValue

ArrayRef<StringRef> llvm::mustache::Token::AccessorValue

Definition at line 159 of file Mustache.cpp.

Referenced by getAccessor(), Token(), and Token().

◆ Indentation

size_t llvm::mustache::Token::Indentation

Definition at line 160 of file Mustache.cpp.

Referenced by getIndentation(), setIndentation(), and Token().

◆ RawBody

StringRef llvm::mustache::Token::RawBody

◆ TokenBody

StringRef llvm::mustache::Token::TokenBody

◆ TokenType

Type llvm::mustache::Token::TokenType

Definition at line 154 of file Mustache.cpp.

Referenced by getType(), Token(), and Token().


The documentation for this class was generated from the following file: