LLVM: llvm::yaml::Node Class Reference (original) (raw)

Abstract base class for all Nodes. More...

#include "[llvm/Support/YAMLParser.h](YAMLParser%5F8h%5Fsource.html)"

Public Types
enum NodeKind { NK_Null, NK_Scalar, NK_BlockScalar, NK_KeyValue, NK_Mapping, NK_Sequence, NK_Alias }
Public Member Functions
Node (unsigned int Type, std::unique_ptr< Document > &, StringRef Anchor, StringRef Tag)
Node (const Node &)=delete
void operator= (const Node &)=delete
void * operator new (size_t Size, BumpPtrAllocator &Alloc, size_t Alignment=16) noexcept
void operator delete (void *Ptr, BumpPtrAllocator &Alloc, size_t Size) noexcept
void operator delete (void *) noexcept=delete
StringRef getAnchor () const
Get the value of the anchor attached to this node.
StringRef getRawTag () const
Get the tag as it was written in the document.
std::string getVerbatimTag () const
Get the verbatium tag for a given Node.
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
Protected Member Functions

Abstract base class for all Nodes.

Definition at line 121 of file YAMLParser.h.

NodeKind

Enumerator
NK_Null
NK_Scalar
NK_BlockScalar
NK_KeyValue
NK_Mapping
NK_Sequence
NK_Alias

Definition at line 125 of file YAMLParser.h.

Node() [1/2]

Referenced by llvm::yaml::AliasNode::AliasNode(), llvm::yaml::MappingNode::basic_collection_iterator< MappingNode, KeyValueNode >, llvm::yaml::SequenceNode::basic_collection_iterator< SequenceNode, Node >, llvm::yaml::BlockScalarNode::BlockScalarNode(), llvm::yaml::AliasNode::classof(), llvm::yaml::BlockScalarNode::classof(), llvm::yaml::KeyValueNode::classof(), llvm::yaml::MappingNode::classof(), llvm::yaml::NullNode::classof(), llvm::yaml::ScalarNode::classof(), llvm::yaml::SequenceNode::classof(), llvm::yaml::KeyValueNode::getKey(), llvm::yaml::KeyValueNode::getValue(), llvm::yaml::KeyValueNode::KeyValueNode(), Node(), llvm::yaml::NullNode::NullNode(), operator=(), parseBlockNode(), llvm::yaml::ScalarNode::ScalarNode(), and llvm::yaml::KeyValueNode::skip().

Node() [2/2]

llvm::yaml::Node::Node ( const Node & ) delete

References Node().

llvm::yaml::Node::~Node ( ) protecteddefault

failed()

bool Node::failed ( ) const

getAllocator()

getAnchor()

StringRef llvm::yaml::Node::getAnchor ( ) const inline

Get the value of the anchor attached to this node.

If it does not have one, getAnchor().size() will be 0.

Definition at line 157 of file YAMLParser.h.

getNext()

getRawTag()

StringRef llvm::yaml::Node::getRawTag ( ) const inline

Get the tag as it was written in the document.

This does not perform tag resolution.

Definition at line 161 of file YAMLParser.h.

Referenced by getVerbatimTag().

getSourceRange()

SMRange llvm::yaml::Node::getSourceRange ( ) const inline

getType()

unsigned int llvm::yaml::Node::getType ( ) const inline

getVerbatimTag()

std::string Node::getVerbatimTag ( ) const

Get the verbatium tag for a given Node.

This performs tag resoluton and substitution.

Definition at line 1963 of file YAMLParser.cpp.

References Doc, llvm::StringRef::empty(), llvm::StringRef::find_last_of(), getRawTag(), getType(), NK_BlockScalar, NK_Mapping, NK_Null, NK_Scalar, NK_Sequence, setError(), llvm::StringRef::starts_with(), llvm::StringRef::substr(), T, and llvm::yaml::Token::TK_Tag.

operator delete() [1/2]

void llvm::yaml::Node::operator delete ( void * ) deletenoexcept

operator delete() [2/2]

void llvm::yaml::Node::operator delete ( void * Ptr, BumpPtrAllocator & Alloc, size_t Size ) inlinenoexcept

operator new()

void * llvm::yaml::Node::operator new ( size_t Size, BumpPtrAllocator & Alloc, size_t Alignment = 16 ) inlinenoexcept

operator=()

void llvm::yaml::Node::operator= ( const Node & ) delete

References Node().

parseBlockNode()

Node * Node::parseBlockNode ( )

peekNext()

Token & Node::peekNext ( )

setError()

setSourceRange()

void llvm::yaml::Node::setSourceRange ( SMRange SR) inline

skip()

virtual void llvm::yaml::Node::skip ( ) inlinevirtual

Doc

std::unique_ptr<Document>& llvm::yaml::Node::Doc protected

SourceRange

SMRange llvm::yaml::Node::SourceRange protected

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