mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Instead of deriving different tokens from a base Token class, we now use an enumerated TOKEN_TYPE to distinguish types. This is so we don't have to cast all the time when parsing the resulting token stream.
Also, removed start/end stream tokens.
This commit is contained in:
@@ -8,9 +8,6 @@ namespace YAML
|
||||
{
|
||||
Parser::Parser(std::istream& in): m_scanner(in)
|
||||
{
|
||||
// eat the stream start token
|
||||
// TODO: check?
|
||||
Token *pToken = m_scanner.GetNextToken();
|
||||
}
|
||||
|
||||
Parser::~Parser()
|
||||
@@ -25,7 +22,7 @@ namespace YAML
|
||||
if(!pToken)
|
||||
break;
|
||||
|
||||
std::cout << typeid(*pToken).name() << ": " << *pToken << std::endl;
|
||||
std::cout << *pToken << std::endl;
|
||||
delete pToken;
|
||||
}
|
||||
getchar();
|
||||
|
Reference in New Issue
Block a user