LLVM API Documentation
Scans YAML tokens from a MemoryBuffer. More...
Public Member Functions | |
| Scanner (const StringRef Input, SourceMgr &SM) | |
| Scanner (MemoryBuffer *Buffer, SourceMgr &SM_) | |
| Token & | peekNext () |
| Parse the next token and return it without popping it. | |
| Token | getNext () |
| Parse the next token and pop it from the queue. | |
| 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. | |
Scans YAML tokens from a MemoryBuffer.
Definition at line 251 of file YAMLParser.cpp.
Definition at line 696 of file YAMLParser.cpp.
References llvm::SourceMgr::AddNewSourceBuffer(), llvm::MemoryBuffer::getBufferEnd(), llvm::MemoryBuffer::getBufferStart(), and llvm::MemoryBuffer::getMemBuffer().
| Scanner::Scanner | ( | MemoryBuffer * | Buffer, |
| SourceMgr & | SM_ | ||
| ) |
Definition at line 711 of file YAMLParser.cpp.
References llvm::SourceMgr::AddNewSourceBuffer().
| bool llvm::yaml::Scanner::failed | ( | ) | [inline] |
Returns true if an error occurred while parsing.
Definition at line 283 of file YAMLParser.cpp.
| Token Scanner::getNext | ( | ) |
Parse the next token and pop it from the queue.
Definition at line 753 of file YAMLParser.cpp.
References llvm::ilist_node_traits< Token >::Alloc, llvm::iplist< NodeTy, Traits >::empty(), peekNext(), llvm::iplist< NodeTy, Traits >::pop_front(), llvm::BumpPtrAllocator::Reset(), and llvm::AArch64ISD::Ret.
Referenced by llvm::yaml::dumpTokens(), and llvm::yaml::scanTokens().
| Token & Scanner::peekNext | ( | ) |
Parse the next token and return it without popping it.
Definition at line 726 of file YAMLParser.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::iplist< NodeTy, Traits >::clear(), llvm::iplist< NodeTy, Traits >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::iplist< NodeTy, Traits >::front(), and llvm::ilist< NodeTy >::push_back().
Referenced by getNext().
| void llvm::yaml::Scanner::printError | ( | SMLoc | Loc, |
| SourceMgr::DiagKind | Kind, | ||
| const Twine & | Message, | ||
| ArrayRef< SMRange > | Ranges = None |
||
| ) | [inline] |
Definition at line 262 of file YAMLParser.cpp.
References llvm::SourceMgr::PrintMessage().
| void llvm::yaml::Scanner::setError | ( | const Twine & | Message, |
| StringRef::iterator | Position | ||
| ) | [inline] |
Definition at line 267 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 278 of file YAMLParser.cpp.