LLVM API Documentation
A scalar node is an opaque datum that can be presented as a series of zero or more Unicode scalar values. More...
#include <YAMLParser.h>
Public Member Functions | |
ScalarNode (OwningPtr< Document > &D, StringRef Anchor, StringRef Tag, StringRef Val) | |
StringRef | getRawValue () const |
StringRef | getValue (SmallVectorImpl< char > &Storage) const |
Gets the value of this node as a StringRef. More... | |
![]() | |
Node (unsigned int Type, OwningPtr< Document > &, StringRef Anchor, StringRef Tag) | |
StringRef | getAnchor () const |
Get the value of the anchor attached to this node. If it does not have one, getAnchor().size() will be 0. More... | |
StringRef | getRawTag () const |
Get the tag as it was written in the document. This does not perform tag resolution. More... | |
std::string | getVerbatimTag () const |
Get the verbatium tag for a given Node. This performs tag resoluton and substitution. More... | |
SMRange | getSourceRange () const |
void | setSourceRange (SMRange SR) |
Token & | peekNext () |
Token | getNext () |
Node * | parseBlockNode () |
BumpPtrAllocator & | getAllocator () |
void | setError (const Twine &Message, Token &Location) const |
bool | failed () const |
virtual void | skip () |
unsigned int | getType () const |
void * | operator new (size_t Size, BumpPtrAllocator &Alloc, size_t Alignment=16) throw () |
void | operator delete (void *Ptr, BumpPtrAllocator &Alloc, size_t) throw () |
Static Public Member Functions | |
static bool | classof (const Node *N) |
Additional Inherited Members | |
![]() | |
enum | NodeKind { NK_Null, NK_Scalar, NK_KeyValue, NK_Mapping, NK_Sequence, NK_Alias } |
![]() | |
void | operator delete (void *) throw () |
virtual | ~Node () |
![]() | |
OwningPtr< Document > & | Doc |
SMRange | SourceRange |
A scalar node is an opaque datum that can be presented as a series of zero or more Unicode scalar values.
Example: Adena
Definition at line 194 of file YAMLParser.h.
|
inline |
Definition at line 197 of file YAMLParser.h.
References llvm::StringRef::begin(), llvm::StringRef::end(), llvm::SMLoc::getFromPointer(), and llvm::yaml::Node::SourceRange.
Definition at line 217 of file YAMLParser.h.
References llvm::yaml::Node::getType(), and llvm::yaml::Node::NK_Scalar.
|
inline |
Definition at line 208 of file YAMLParser.h.
StringRef ScalarNode::getValue | ( | SmallVectorImpl< char > & | Storage | ) | const |
Gets the value of this node as a StringRef.
Storage | is used to store the content of the returned StringRef iff it requires any modification from how it appeared in the source. This happens with escaped characters and multi-line literals. |
Definition at line 1683 of file YAMLParser.cpp.
References llvm::StringRef::begin(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::StringRef::end(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::StringRef::find(), llvm::StringRef::find_first_of(), llvm::SmallVectorImpl< T >::insert(), llvm::StringRef::npos, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::StringRef::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::StringRef::substr().