mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00: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:
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);
|
||||
|
||||
|
Reference in New Issue
Block a user