1 #ifndef C4_YML_NODE_TYPE_HPP_
4 #ifndef C4_YML_ERROR_HPP_
43 if((ty &
KEYVAL) == KEYVAL)
45 if((ty &
KEYMAP) == KEYMAP)
47 if((ty &
KEYSEQ) == KEYSEQ)
49 if((ty &
DOCSEQ) == DOCSEQ)
51 if((ty &
DOCMAP) == DOCMAP)
53 if((ty &
DOCVAL) == DOCVAL)
71 constexpr
const type_and_name type_names[] = {
110 detail::SubstrWriter_ writer(buf);
111 for(type_and_name
const tn : type_names)
113 if((
flags & tn.bits) == tn.bits)
117 writer.append(tn.str);
122 writer.append(
"NOTYPE");
123 if(writer.pos < buf.len)
124 buf[writer.pos] =
'\0';
const char * type_str() const noexcept
return a preset string based on the node type
mark val scalar as plain scalar (unquoted, even when multiline)
the val scalar was left unfiltered; the parser was set not to filter.
mark key scalar as double quoted "
mark key scalar as multiline, block literal |
mark val scalar as single quoted '
the key scalar was left unfiltered; the parser was set not to filter.
mark val scalar as double quoted "
mark container with multi-line flow style, n elements per line, < wrapped (as set by EmitOptions::max...
the key is null (eg { : b} results in a null key)
a scalar: has a scalar (ie string) value, possibly empty. must be a leaf node, and cannot be MAP or S...
mark val scalar as multiline, block folded >
mark key scalar as multiline, block folded >
the val is null (eg {a : } results in a null val)
a *reference: the val references an &anchor
mark container with block style < - seqs as <
the scalar to the left of : in a map's member
a *reference: the key references an &anchor
no node type or style is set
mark container with spaces after comma when in flow mode. < Applies to both FLOW_SL and FLOW_MLN (but...
mark key scalar as plain scalar (unquoted, even when multiline)
Error utilities used by ryml.
mark val scalar as multiline, block literal |
uint32_t type_bits
the integral type necessary to cover all the bits for NodeType_e
a map: a parent of KEYVAL/KEYSEQ/KEYMAP nodes
mark key scalar as single quoted '
mark container with multi-line flow style, 1 element per line < - seqs as <
a seq: a parent of VAL/SEQ/MAP nodes
mark container with single-line flow style < - seqs as <