LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::yaml::Scanner Class Reference

Scans YAML tokens from a MemoryBuffer. More...

Public Member Functions

 Scanner (const StringRef Input, SourceMgr &SM)
 
 Scanner (MemoryBuffer *Buffer, SourceMgr &SM_)
 
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 260 of file YAMLParser.cpp.

Constructor & Destructor Documentation

Scanner::Scanner ( const StringRef  Input,
SourceMgr SM 
)
Scanner::Scanner ( MemoryBuffer Buffer,
SourceMgr SM_ 
)

Definition at line 720 of file YAMLParser.cpp.

References llvm::SourceMgr::AddNewSourceBuffer().

Member Function Documentation

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

Returns true if an error occurred while parsing.

Definition at line 292 of file YAMLParser.cpp.

Token Scanner::getNext ( )

Parse the next token and pop it from the queue.

Definition at line 762 of file YAMLParser.cpp.

References llvm::iplist< NodeTy, Traits >::empty(), peekNext(), llvm::iplist< NodeTy, Traits >::pop_front(), and llvm::AArch64ISD::Ret.

Referenced by llvm::yaml::dumpTokens(), and llvm::yaml::scanTokens().

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

Definition at line 271 of file YAMLParser.cpp.

References llvm::SourceMgr::PrintMessage().

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

Definition at line 276 of file YAMLParser.cpp.

References llvm::SourceMgr::DK_Error, and llvm::SMLoc::getFromPointer().

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

Definition at line 287 of file YAMLParser.cpp.


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