LLVM API Documentation
Abstract base class for all Nodes. More...
#include <YAMLParser.h>
Public Types | |
enum | NodeKind { NK_Null, NK_Scalar, NK_KeyValue, NK_Mapping, NK_Sequence, NK_Alias } |
Public Member Functions | |
Node (unsigned int Type, std::unique_ptr< 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. | |
StringRef | getRawTag () const |
Get the tag as it was written in the document. This does not perform tag resolution. | |
std::string | getVerbatimTag () const |
Get the verbatium tag for a given Node. This performs tag resoluton and substitution. | |
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 Size) throw () |
Protected Member Functions | |
void | operator delete (void *) throw () |
virtual | ~Node () |
Protected Attributes | |
std::unique_ptr< Document > & | Doc |
SMRange | SourceRange |
Abstract base class for all Nodes.
Definition at line 104 of file YAMLParser.h.
Definition at line 108 of file YAMLParser.h.
Definition at line 1559 of file YAMLParser.cpp.
References llvm::SMLoc::getFromPointer(), peekNext(), and SourceRange.
virtual llvm::yaml::Node::~Node | ( | ) | [inline, protected, virtual] |
Definition at line 162 of file YAMLParser.h.
bool Node::failed | ( | ) | const |
Definition at line 1630 of file YAMLParser.cpp.
Definition at line 1622 of file YAMLParser.cpp.
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 122 of file YAMLParser.h.
Token Node::getNext | ( | ) |
Definition at line 1614 of file YAMLParser.cpp.
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 126 of file YAMLParser.h.
Referenced by getVerbatimTag().
SMRange llvm::yaml::Node::getSourceRange | ( | ) | const [inline] |
Definition at line 132 of file YAMLParser.h.
References SourceRange.
Referenced by llvm::yaml::Stream::printError().
unsigned int llvm::yaml::Node::getType | ( | ) | const [inline] |
Definition at line 145 of file YAMLParser.h.
Referenced by llvm::yaml::NullNode::classof(), llvm::yaml::ScalarNode::classof(), llvm::yaml::KeyValueNode::classof(), llvm::yaml::MappingNode::classof(), llvm::yaml::SequenceNode::classof(), and llvm::yaml::AliasNode::classof().
std::string Node::getVerbatimTag | ( | ) | const |
Get the verbatium tag for a given Node. This performs tag resoluton and substitution.
Definition at line 1566 of file YAMLParser.cpp.
References Doc, llvm::StringRef::empty(), llvm::StringRef::find_last_of(), getRawTag(), llvm::yaml::Token::Kind, llvm::yaml::Token::Range, llvm::MipsISD::Ret, setError(), llvm::StringRef::startswith(), llvm::StringRef::substr(), T, and llvm::yaml::Token::TK_Tag.
void llvm::yaml::Node::operator delete | ( | void * | Ptr, |
BumpPtrAllocator & | Alloc, | ||
size_t | Size | ||
) | throw () [inline] |
Definition at line 152 of file YAMLParser.h.
void llvm::yaml::Node::operator delete | ( | void * | ) | throw () [inline, protected] |
Definition at line 160 of file YAMLParser.h.
void* llvm::yaml::Node::operator new | ( | size_t | Size, |
BumpPtrAllocator & | Alloc, | ||
size_t | Alignment = 16 |
||
) | throw () [inline] |
Definition at line 147 of file YAMLParser.h.
References llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >::Allocate().
Node * Node::parseBlockNode | ( | ) |
Definition at line 1618 of file YAMLParser.cpp.
References parseBlockNode().
Referenced by parseBlockNode().
Token & Node::peekNext | ( | ) |
Definition at line 1610 of file YAMLParser.cpp.
Referenced by Node().
void Node::setError | ( | const Twine & | Message, |
Token & | Location | ||
) | const |
Definition at line 1626 of file YAMLParser.cpp.
Referenced by getVerbatimTag().
void llvm::yaml::Node::setSourceRange | ( | SMRange | SR | ) | [inline] |
Definition at line 133 of file YAMLParser.h.
References SourceRange.
virtual void llvm::yaml::Node::skip | ( | ) | [inline, virtual] |
Reimplemented in llvm::yaml::SequenceNode, llvm::yaml::MappingNode, and llvm::yaml::KeyValueNode.
Definition at line 143 of file YAMLParser.h.
Referenced by llvm::yaml::KeyValueNode::skip(), and llvm::yaml::Document::skip().
std::unique_ptr<Document>& llvm::yaml::Node::Doc [protected] |
Definition at line 157 of file YAMLParser.h.
Referenced by getVerbatimTag().
SMRange llvm::yaml::Node::SourceRange [protected] |
Definition at line 158 of file YAMLParser.h.
Referenced by getSourceRange(), Node(), llvm::yaml::ScalarNode::ScalarNode(), and setSourceRange().