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:
Jesse Beder 2008-06-27 23:11:46 +00:00
parent a224c7818b
commit 49a75b2d78
9 changed files with 307 additions and 54 deletions

View file

@ -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);