class Scanner

Declaration

class Scanner { /* full declaration omitted */ };

Description

Scans YAML tokens from a MemoryBuffer.

Declared at: llvm/lib/Support/YAMLParser.cpp:252

Method Overview

  • public Scanner(llvm::StringRef Input, llvm::SourceMgr & SM, bool ShowColors = true, std::error_code * EC = nullptr)
  • public Scanner(llvm::MemoryBufferRef Buffer, llvm::SourceMgr & SM_, bool ShowColors = true, std::error_code * EC = nullptr)
  • public bool failed()
  • public llvm::yaml::Token getNext()
  • public llvm::yaml::Token & peekNext()
  • public void printError(llvm::SMLoc Loc, SourceMgr::DiagKind Kind, const llvm::Twine & Message, ArrayRef<llvm::SMRange> Ranges = None)
  • public void setError(const llvm::Twine & Message, StringRef::iterator Position)
  • public void setError(const llvm::Twine & Message)

Methods

Scanner(llvm::StringRef Input,
        llvm::SourceMgr& SM,
        bool ShowColors = true,
        std::error_code* EC = nullptr)

Declared at: llvm/lib/Support/YAMLParser.cpp:254

Parameters

llvm::StringRef Input
llvm::SourceMgr& SM
bool ShowColors = true
std::error_code* EC = nullptr

Scanner(llvm::MemoryBufferRef Buffer,
        llvm::SourceMgr& SM_,
        bool ShowColors = true,
        std::error_code* EC = nullptr)

Declared at: llvm/lib/Support/YAMLParser.cpp:256

Parameters

llvm::MemoryBufferRef Buffer
llvm::SourceMgr& SM_
bool ShowColors = true
std::error_code* EC = nullptr

bool failed()

Description

Returns true if an error occurred while parsing.

Declared at: llvm/lib/Support/YAMLParser.cpp:290

llvm::yaml::Token getNext()

Description

Parse the next token and pop it from the queue.

Declared at: llvm/lib/Support/YAMLParser.cpp:263

llvm::yaml::Token& peekNext()

Description

Parse the next token and return it without popping it.

Declared at: llvm/lib/Support/YAMLParser.cpp:260

void printError(
    llvm::SMLoc Loc,
    SourceMgr::DiagKind Kind,
    const llvm::Twine& Message,
    ArrayRef<llvm::SMRange> Ranges = None)

Declared at: llvm/lib/Support/YAMLParser.cpp:265

Parameters

llvm::SMLoc Loc
SourceMgr::DiagKind Kind
const llvm::Twine& Message
ArrayRef<llvm::SMRange> Ranges = None

void setError(const llvm::Twine& Message,
              StringRef::iterator Position)

Declared at: llvm/lib/Support/YAMLParser.cpp:270

Parameters

const llvm::Twine& Message
StringRef::iterator Position

void setError(const llvm::Twine& Message)

Declared at: llvm/lib/Support/YAMLParser.cpp:285

Parameters

const llvm::Twine& Message