mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
Added a peek token command (for the parser to use).
This commit is contained in:
parent
07d4cac48f
commit
ed6c294749
6 changed files with 109 additions and 113 deletions
15
document.cpp
15
document.cpp
|
@ -5,6 +5,9 @@
|
|||
#include "exceptions.h"
|
||||
#include <fstream>
|
||||
|
||||
#include <iostream>
|
||||
#include "token.h"
|
||||
|
||||
namespace YAML
|
||||
{
|
||||
Document::Document(): m_pRoot(0)
|
||||
|
@ -34,10 +37,16 @@ namespace YAML
|
|||
std::ifstream fin(fileName.c_str());
|
||||
Scanner scanner(fin);
|
||||
|
||||
scanner.Scan();
|
||||
// scan and output, for now
|
||||
while(1) {
|
||||
Token *pToken = scanner.GetNextToken();
|
||||
if(!pToken)
|
||||
break;
|
||||
|
||||
std::cout << typeid(*pToken).name() << ": " << *pToken << std::endl;
|
||||
delete pToken;
|
||||
}
|
||||
getchar();
|
||||
// if(!scanner)
|
||||
// return;
|
||||
|
||||
// m_pRoot = parser.ReadNextNode();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue