mirror of
https://github.com/biojppm/rapidyaml.git
synced 2026-01-18 21:41:18 +01:00
yamlscript wip
put yamlscript fns in the global namespace yamlscript functions were moved to that repo
This commit is contained in:
@@ -9,6 +9,15 @@
|
||||
namespace c4 {
|
||||
namespace yml {
|
||||
|
||||
std::string emit_events_from_source(substr src)
|
||||
{
|
||||
EventHandlerYamlStd::EventSink sink;
|
||||
EventHandlerYamlStd handler(&sink);
|
||||
ParseEngine<EventHandlerYamlStd> parser(&handler);
|
||||
parser.parse_in_place_ev("(testyaml)", src);
|
||||
return sink.result;
|
||||
}
|
||||
|
||||
// instantiate the template
|
||||
template class ParseEngine<EventHandlerYamlStd>;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ C4_SUPPRESS_WARNING_GCC_CLANG_PUSH
|
||||
C4_SUPPRESS_WARNING_GCC_CLANG("-Wold-style-cast")
|
||||
C4_SUPPRESS_WARNING_GCC("-Wuseless-cast")
|
||||
|
||||
|
||||
namespace c4 {
|
||||
namespace yml {
|
||||
|
||||
@@ -28,6 +29,8 @@ namespace yml {
|
||||
/** @addtogroup doc_event_handlers
|
||||
* @{ */
|
||||
|
||||
std::string emit_events_from_source(substr src);
|
||||
|
||||
/** The stack state needed specifically by @ref EventHandlerYamlStd */
|
||||
struct EventHandlerYamlStdState : public ParserState
|
||||
{
|
||||
|
||||
@@ -8,17 +8,6 @@
|
||||
namespace c4 {
|
||||
namespace yml {
|
||||
|
||||
|
||||
std::string emit_events_from_source(substr src)
|
||||
{
|
||||
EventHandlerYamlStd::EventSink sink;
|
||||
EventHandlerYamlStd handler(&sink);
|
||||
ParseEngine<EventHandlerYamlStd> parser(&handler);
|
||||
parser.parse_in_place_ev("(testyaml)", src);
|
||||
return sink.result;
|
||||
}
|
||||
|
||||
|
||||
namespace /*anon*/ {
|
||||
|
||||
csubstr filtered_scalar(csubstr str, Tree *tree)
|
||||
|
||||
Reference in New Issue
Block a user