mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Fixed flow folding, and made the separation slightly cleaner (but the whole scanscalar thing could use a major refactoring)
This commit is contained in:
@@ -12,9 +12,10 @@ namespace YAML
|
||||
{
|
||||
enum CHOMP { STRIP = -1, CLIP, KEEP };
|
||||
enum ACTION { NONE, BREAK, THROW };
|
||||
enum FOLD { DONT_FOLD, FOLD_BLOCK, FOLD_FLOW };
|
||||
|
||||
struct ScanScalarParams {
|
||||
ScanScalarParams(): eatEnd(false), indent(0), detectIndent(false), eatLeadingWhitespace(0), escape(0), fold(false),
|
||||
ScanScalarParams(): eatEnd(false), indent(0), detectIndent(false), eatLeadingWhitespace(0), escape(0), fold(DONT_FOLD),
|
||||
trimTrailingSpaces(0), chomp(CLIP), onDocIndicator(NONE), onTabInIndentation(NONE), leadingSpaces(false) {}
|
||||
|
||||
// input:
|
||||
@@ -24,7 +25,7 @@ namespace YAML
|
||||
bool detectIndent; // should we try to autodetect the indent?
|
||||
bool eatLeadingWhitespace; // should we continue eating this delicious indentation after 'indent' spaces?
|
||||
char escape; // what character do we escape on (i.e., slash or single quote) (0 for none)
|
||||
bool fold; // do we fold line ends?
|
||||
FOLD fold; // how do we fold line ends?
|
||||
bool trimTrailingSpaces; // do we remove all trailing spaces (at the very end)
|
||||
CHOMP chomp; // do we strip, clip, or keep trailing newlines (at the very end)
|
||||
// Note: strip means kill all, clip means keep at most one, keep means keep all
|
||||
|
Reference in New Issue
Block a user