mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +12:00
Moved the input stream, together with line/column info, into its own class, which allowed some other stuff just to pass the stream, and not have to be a member of Scanner.
This commit is contained in:
parent
0d5a97bffe
commit
ff99f85a6d
13 changed files with 162 additions and 142 deletions
|
@ -34,10 +34,10 @@ namespace YAML
|
|||
// and saves it on a stack.
|
||||
void Scanner::InsertSimpleKey()
|
||||
{
|
||||
SimpleKey key(INPUT.tellg(), m_line, m_column, m_flowLevel);
|
||||
SimpleKey key(INPUT.pos(), INPUT.line, INPUT.column, m_flowLevel);
|
||||
|
||||
// first add a map start, if necessary
|
||||
key.pMapStart = PushIndentTo(m_column, false);
|
||||
key.pMapStart = PushIndentTo(INPUT.column, false);
|
||||
if(key.pMapStart)
|
||||
key.pMapStart->isValid = false;
|
||||
// else
|
||||
|
@ -79,7 +79,7 @@ namespace YAML
|
|||
isValid = false;
|
||||
|
||||
// also needs to be less than 1024 characters and inline
|
||||
if(m_line != key.line || (int) INPUT.tellg() - key.pos > 1024)
|
||||
if(INPUT.line != key.line || INPUT.pos() - key.pos > 1024)
|
||||
isValid = false;
|
||||
|
||||
// invalidate key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue