mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +12:00
Added quoted scalars (with escaping).
Refactored some common whitespace-parsing code in scanning both scalars. Implemented the flow collection tokens.
This commit is contained in:
parent
a224c7818b
commit
49a75b2d78
9 changed files with 307 additions and 54 deletions
12
scanner.h
12
scanner.h
|
@ -20,6 +20,8 @@ namespace YAML
|
|||
void ScanToNextToken();
|
||||
void PushIndentTo(int column, bool sequence);
|
||||
void PopIndentTo(int column);
|
||||
void IncreaseFlowLevel();
|
||||
void DecreaseFlowLevel();
|
||||
|
||||
void Scan();
|
||||
|
||||
|
@ -37,6 +39,16 @@ namespace YAML
|
|||
bool IsValue();
|
||||
bool IsPlainScalar();
|
||||
|
||||
struct WhitespaceInfo {
|
||||
WhitespaceInfo();
|
||||
void AddBlank(char ch);
|
||||
void AddBreak(const std::string& line);
|
||||
std::string Join();
|
||||
|
||||
bool leadingBlanks;
|
||||
std::string whitespace, leadingBreaks, trailingBreaks;
|
||||
};
|
||||
|
||||
template <typename T> void ScanAndEnqueue(T *pToken);
|
||||
template <typename T> T *ScanToken(T *pToken);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue