mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
Moved the simple key validation to before each token scan (plus at newlines of scalars).
This commit is contained in:
parent
11706abbb7
commit
c63ebbd878
4 changed files with 66 additions and 34 deletions
|
@ -16,6 +16,8 @@ namespace YAML
|
|||
Scanner(std::istream& in);
|
||||
~Scanner();
|
||||
|
||||
Token *GetNextToken();
|
||||
|
||||
void ScanNextToken();
|
||||
void ScanToNextToken();
|
||||
Token *PushIndentTo(int column, bool sequence);
|
||||
|
@ -55,12 +57,12 @@ namespace YAML
|
|||
};
|
||||
|
||||
struct SimpleKey {
|
||||
SimpleKey(int pos_, int line_, int column_);
|
||||
SimpleKey(int pos_, int line_, int column_, int flowLevel_);
|
||||
|
||||
void Validate();
|
||||
void Invalidate();
|
||||
|
||||
int pos, line, column;
|
||||
int pos, line, column, flowLevel;
|
||||
bool required;
|
||||
Token *pMapStart, *pKey;
|
||||
};
|
||||
|
@ -81,6 +83,7 @@ namespace YAML
|
|||
bool m_startedStream, m_endedStream;
|
||||
bool m_simpleKeyAllowed;
|
||||
int m_flowLevel; // number of unclosed '[' and '{' indicators
|
||||
bool m_isLastKeyValid;
|
||||
std::stack <SimpleKey> m_simpleKeys;
|
||||
std::stack <int> m_indents;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue