LLVM
8.0.1
|
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) | |
Token & | peekNext () |
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... | |
Scans YAML tokens from a MemoryBuffer.
Definition at line 253 of file YAMLParser.cpp.
Scanner::Scanner | ( | StringRef | Input, |
SourceMgr & | SM, | ||
bool | ShowColors = true , |
||
std::error_code * | EC = nullptr |
||
) |
Definition at line 757 of file YAMLParser.cpp.
Scanner::Scanner | ( | MemoryBufferRef | Buffer, |
SourceMgr & | SM_, | ||
bool | ShowColors = true , |
||
std::error_code * | EC = nullptr |
||
) |
Definition at line 763 of file YAMLParser.cpp.
References llvm::SourceMgr::AddNewSourceBuffer(), llvm::MemoryBufferRef::getBufferEnd(), llvm::MemoryBufferRef::getBufferStart(), and llvm::MemoryBuffer::getMemBuffer().
|
inline |
Returns true if an error occurred while parsing.
Definition at line 291 of file YAMLParser.cpp.
References llvm::Failed(), and llvm::cl::init().
Token Scanner::getNext | ( | ) |
Parse the next token and pop it from the queue.
Definition at line 811 of file YAMLParser.cpp.
References llvm::AllocatorList< T, AllocatorT >::empty(), peekNext(), llvm::AllocatorList< T, AllocatorT >::pop_front(), llvm::AllocatorList< T, AllocatorT >::resetAlloc(), and llvm::MipsISD::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 785 of file YAMLParser.cpp.
References assert(), llvm::AllocatorList< T, AllocatorT >::begin(), llvm::AllocatorList< T, AllocatorT >::clear(), llvm::AllocatorList< T, AllocatorT >::empty(), llvm::AllocatorList< T, AllocatorT >::front(), llvm::is_contained(), and llvm::AllocatorList< T, AllocatorT >::push_back().
Referenced by getNext().
|
inline |
Definition at line 266 of file YAMLParser.cpp.
References llvm::None, and llvm::SourceMgr::PrintMessage().
|
inline |
Definition at line 271 of file YAMLParser.cpp.
Referenced by is_ns_word_char().
Definition at line 286 of file YAMLParser.cpp.
References llvm::yaml::Node::setError().