class ScalarNode

Declaration

class ScalarNode : public Node { /* full declaration omitted */ };

Description

A scalar node is an opaque datum that can be presented as a series of zero or more Unicode scalar values. Example: Adena

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

Inherits from: Node

Member Variables

Inherited from Node:

protected Doc
protected SourceRange

Method Overview

  • public ScalarNode(std::unique_ptr<Document> & D, llvm::StringRef Anchor, llvm::StringRef Tag, llvm::StringRef Val)
  • public static bool classof(const llvm::yaml::Node * N)
  • public llvm::StringRef getRawValue() const
  • public llvm::StringRef getValue(SmallVectorImpl<char> & Storage) const

Inherited from Node:

Methods

ScalarNode(std::unique_ptr<Document>& D,
           llvm::StringRef Anchor,
           llvm::StringRef Tag,
           llvm::StringRef Val)

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

Parameters

std::unique_ptr<Document>& D
llvm::StringRef Anchor
llvm::StringRef Tag
llvm::StringRef Val

static bool classof(const llvm::yaml::Node* N)

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

Parameters

const llvm::yaml::Node* N

llvm::StringRef getRawValue() const

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

llvm::StringRef getValue(
    SmallVectorImpl<char>& Storage) const

Description

Gets the value of this node as a StringRef.

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

Parameters

SmallVectorImpl<char>& 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.