rapidyaml  0.11.0
parse and emit YAML, and do it fast
node_type.cpp File Reference

Go to the source code of this file.

Namespaces

 c4
 (Undefined by default) Use shorter error message from checks/asserts: do not show the check condition in the error message.
 
 c4::yml
 

Macros

#define _prflag(fl, txt)
 

Functions

scalar style helpers
bool c4::yml::scalar_style_query_squo (csubstr s) noexcept
 query whether a scalar can be encoded using single quotes. More...
 
bool c4::yml::scalar_style_query_plain (csubstr s) noexcept
 query whether a scalar can be encoded using plain style (no quotes, not a literal/folded block scalar). More...
 
NodeType_e c4::yml::scalar_style_choose (csubstr scalar) noexcept
 choose a YAML emitting style based on the scalar's contents More...
 
NodeType_e c4::yml::scalar_style_json_choose (csubstr scalar) noexcept
 choose a json style based on the scalar's contents More...
 

Macro Definition Documentation

◆ _prflag

#define _prflag (   fl,
  txt 
)
Value:
do { \
if((flags & (fl)) == (fl)) \
{ \
if(gotone) \
{ \
if(pos + 1 < buf.len) \
buf[pos] = '|'; \
++pos; \
} \
csubstr fltxt = txt; \
if(pos + fltxt.len <= buf.len) \
memcpy(buf.str + pos, fltxt.str, fltxt.len); \
pos += fltxt.len; \
gotone = true; \
flags = (flags & ~(fl)); /*remove the flag*/ \
} \
} while(0)