class Document
Declaration
class Document { /* full declaration omitted */ };
Description
A YAML Stream is a sequence of Documents. A document contains a root node.
Declared at: llvm/include/llvm/Support/YAMLParser.h:530
Member Variables
- private llvm::yaml::Stream& stream
- Stream to read tokens from.
- private llvm::BumpPtrAllocator NodeAllocator
- Used to allocate nodes to. All are destroyed without calling their destructor when the document is destroyed.
- private llvm::yaml::Node* Root
- The root node. Used to support skipping a partially parsed document.
- private std::map<StringRef, StringRef> TagMap
- Maps tag prefixes to their expansion.
Method Overview
- public Document(llvm::yaml::Stream & ParentStream)
- private bool expectToken(int TK)
- private bool failed() const
- private llvm::yaml::Token getNext()
- public llvm::yaml::Node * getRoot()
- public const std::map<StringRef, StringRef> & getTagMap() const
- public llvm::yaml::Node * parseBlockNode()
- private bool parseDirectives()
- private void parseTAGDirective()
- private void parseYAMLDirective()
- private llvm::yaml::Token & peekNext()
- private void setError(const llvm::Twine & Message, llvm::yaml::Token & Location) const
- public bool skip()
Methods
¶Document(llvm::yaml::Stream& ParentStream)
Document(llvm::yaml::Stream& ParentStream)
Declared at: llvm/include/llvm/Support/YAMLParser.h:532
Parameters
- llvm::yaml::Stream& ParentStream
¶bool expectToken(int TK)
bool expectToken(int TK)
Description
Consume the next token and error if it is not \a TK.
Declared at: llvm/include/llvm/Support/YAMLParser.h:583
Parameters
- int TK
¶bool failed() const
bool failed() const
Declared at: llvm/include/llvm/Support/YAMLParser.h:571
¶llvm::yaml::Token getNext()
llvm::yaml::Token getNext()
Declared at: llvm/include/llvm/Support/YAMLParser.h:569
¶llvm::yaml::Node* getRoot()
llvm::yaml::Node* getRoot()
Description
Parse and return the root level node.
Declared at: llvm/include/llvm/Support/YAMLParser.h:542
¶const std::map<StringRef, StringRef>& getTagMap()
const
const std::map<StringRef, StringRef>& getTagMap()
const
Declared at: llvm/include/llvm/Support/YAMLParser.h:548
¶llvm::yaml::Node* parseBlockNode()
llvm::yaml::Node* parseBlockNode()
Description
Root for parsing a node. Returns a single node.
Declared at: llvm/include/llvm/Support/YAMLParser.h:535
¶bool parseDirectives()
bool parseDirectives()
Description
Parse %BLAH directives and return true if any were encountered.
Declared at: llvm/include/llvm/Support/YAMLParser.h:574
¶void parseTAGDirective()
void parseTAGDirective()
Description
Parse %TAG
Declared at: llvm/include/llvm/Support/YAMLParser.h:580
¶void parseYAMLDirective()
void parseYAMLDirective()
Description
Parse %YAML
Declared at: llvm/include/llvm/Support/YAMLParser.h:577
¶llvm::yaml::Token& peekNext()
llvm::yaml::Token& peekNext()
Declared at: llvm/include/llvm/Support/YAMLParser.h:568
¶void setError(const llvm::Twine& Message,
llvm::yaml::Token& Location) const
void setError(const llvm::Twine& Message,
llvm::yaml::Token& Location) const
Declared at: llvm/include/llvm/Support/YAMLParser.h:570
Parameters
- const llvm::Twine& Message
- llvm::yaml::Token& Location
¶bool skip()
bool skip()
Description
Finish parsing the current document and return true if there are more. Return false otherwise.
Declared at: llvm/include/llvm/Support/YAMLParser.h:539