mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
Continued working on scanner.
We're now using exceptions for errors, and scanning/pushing tokens is exception-safe (using a set of "limbo tokens").
This commit is contained in:
parent
8ae7b48188
commit
a3961d047f
6 changed files with 461 additions and 16 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "node.h"
|
||||
#include "parser.h"
|
||||
#include "scanner.h"
|
||||
#include "exceptions.h"
|
||||
#include <fstream>
|
||||
|
||||
namespace YAML
|
||||
|
@ -32,7 +33,11 @@ namespace YAML
|
|||
|
||||
std::ifstream fin(fileName.c_str());
|
||||
Scanner scanner(fin);
|
||||
scanner.Scan();
|
||||
|
||||
try {
|
||||
scanner.Scan();
|
||||
} catch(const UnknownToken& e) {
|
||||
}
|
||||
// if(!scanner)
|
||||
// return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue