scanscalar.h 678 Bytes
Newer Older
1
2
3
#pragma once

#include <string>
4
5
#include "regex.h"
#include "stream.h"
6
7
8

namespace YAML
{
9
10
11
	void GetBlockIndentation(Stream& INPUT, int& indent, std::string& breaks, int topIndent);
	std::string ScanScalar(Stream& INPUT, RegEx end, bool eatEnd, int indent, char escape, bool fold, bool eatLeadingWhitespace, bool trimTrailingSpaces, int chomp);

12
13
14
15
16
17
18
19
20
21
22
23
24
25
	struct WhitespaceInfo {
		WhitespaceInfo();

		void SetChompers(char ch);
		void AddBlank(char ch);
		void AddBreak(const std::string& line);
		std::string Join(bool lastline = false);

		bool leadingBlanks;
		bool fold;
		std::string whitespace, leadingBreaks, trailingBreaks;
		int chomp, increment;
	};
}