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

Methods

Document(llvm::yaml::Stream& ParentStream)

Declared at: llvm/include/llvm/Support/YAMLParser.h:532

Parameters

llvm::yaml::Stream& ParentStream

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

Declared at: llvm/include/llvm/Support/YAMLParser.h:571

llvm::yaml::Token getNext()

Declared at: llvm/include/llvm/Support/YAMLParser.h:569

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

Declared at: llvm/include/llvm/Support/YAMLParser.h:548

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()

Description

Parse %BLAH directives and return true if any were encountered.

Declared at: llvm/include/llvm/Support/YAMLParser.h:574

void parseTAGDirective()

Description

Parse %TAG

Declared at: llvm/include/llvm/Support/YAMLParser.h:580

void parseYAMLDirective()

Description

Parse %YAML

Declared at: llvm/include/llvm/Support/YAMLParser.h:577

llvm::yaml::Token& peekNext()

Declared at: llvm/include/llvm/Support/YAMLParser.h:568

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()

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