LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::yaml::Scanner Class Reference

Scans YAML tokens from a MemoryBuffer. More...

Public Member Functions

 Scanner (StringRef Input, SourceMgr &SM, bool ShowColors=true, std::error_code *EC=nullptr)
 
 Scanner (MemoryBufferRef Buffer, SourceMgr &SM_, bool ShowColors=true, std::error_code *EC=nullptr)
 
TokenpeekNext ()
 Parse the next token and return it without popping it. More...
 
Token getNext ()
 Parse the next token and pop it from the queue. More...
 
void printError (SMLoc Loc, SourceMgr::DiagKind Kind, const Twine &Message, ArrayRef< SMRange > Ranges=None)
 
void setError (const Twine &Message, StringRef::iterator Position)
 
void setError (const Twine &Message)
 
bool failed ()
 Returns true if an error occurred while parsing. More...
 

Detailed Description

Scans YAML tokens from a MemoryBuffer.

Definition at line 252 of file YAMLParser.cpp.

Constructor & Destructor Documentation

◆ Scanner() [1/2]

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

Definition at line 753 of file YAMLParser.cpp.

◆ Scanner() [2/2]

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

Member Function Documentation

◆ failed()

bool llvm::yaml::Scanner::failed ( )
inline

Returns true if an error occurred while parsing.

Definition at line 290 of file YAMLParser.cpp.

References decodeUTF8(), llvm::WebAssembly::End, llvm::cl::init(), Kind, llvm::yaml::Node::skip(), and skipComment().

◆ getNext()

Token Scanner::getNext ( )

◆ peekNext()

Token & Scanner::peekNext ( )

◆ printError()

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

Definition at line 265 of file YAMLParser.cpp.

References llvm::None, and llvm::SourceMgr::PrintMessage().

◆ setError() [1/2]

void llvm::yaml::Scanner::setError ( const Twine Message,
StringRef::iterator  Position 
)
inline

◆ setError() [2/2]

void llvm::yaml::Scanner::setError ( const Twine Message)
inline

Definition at line 285 of file YAMLParser.cpp.

References llvm::yaml::Node::setError().


The documentation for this class was generated from the following file: