|
rapidyaml 0.15.2
parse and emit YAML, and do it fast
|
These functions are used by the emitter to choose a scalar style when a scalar does not have it set. More...
Functions | |
| bool | c4::yml::scalar_style_query_squo (csubstr scalar) noexcept |
| query whether a scalar can be encoded using single quotes. | |
| bool | c4::yml::scalar_style_query_plain_flow (csubstr scalar) noexcept |
| query whether a scalar can be encoded using plain style while in flow mode. | |
| bool | c4::yml::scalar_style_query_plain_block (csubstr scalar) noexcept |
| query whether a scalar can be encoded using plain style while in block mode. | |
| NodeType | c4::yml::scalar_style_choose_flow (csubstr scalar) noexcept |
| choose a YAML scalar style based on the scalar's contents, while in flow mode. | |
| NodeType | c4::yml::scalar_style_choose_block (csubstr scalar) noexcept |
| choose a YAML scalar style based on the scalar's contents, while in block mode. | |
| NodeType | c4::yml::scalar_style_choose_json (csubstr scalar) noexcept |
| choose a json scalar style based on the scalar's contents | |
These functions are used by the emitter to choose a scalar style when a scalar does not have it set.
|
noexcept |
query whether a scalar can be encoded using single quotes.
It may not be possible, notably when there is leading whitespace after a newline.
Definition at line 15 of file scalar_style.cpp.
Referenced by scalar_style_choose_block(), and scalar_style_choose_flow().
|
noexcept |
query whether a scalar can be encoded using plain style while in flow mode.
Plain scalars [have more constraints in flow mode than in block mode](https://www.yaml.info/learn/quote.html#noplain). scalar_style_query_plain_block() is the block mode analogous function.
Definition at line 51 of file scalar_style.cpp.
Referenced by scalar_style_choose_flow().
|
noexcept |
query whether a scalar can be encoded using plain style while in block mode.
Plain scalars [have more constraints in flow mode than in block mode](https://www.yaml.info/learn/quote.html#noplain). scalar_style_query_plain_flow() is the flow mode analogous function.
Definition at line 101 of file scalar_style.cpp.
Referenced by scalar_style_choose_block().
choose a YAML scalar style based on the scalar's contents, while in flow mode.
Plain scalars [have more constraints in flow mode than in block mode](https://www.yaml.info/learn/quote.html#noplain). scalar_style_choose_block() is the block mode analogous function.
Definition at line 46 of file scalar_style.hpp.
choose a YAML scalar style based on the scalar's contents, while in block mode.
Plain scalars [have more constraints in flow mode than in block mode](https://www.yaml.info/learn/quote.html#noplain). scalar_style_choose_block() is the flow mode analogous function.
Definition at line 146 of file scalar_style.cpp.
choose a json scalar style based on the scalar's contents
Definition at line 160 of file scalar_style.cpp.