From db6fe5af8bb55d769495593b3d1aa7d0240fc9a2 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 28 Jul 2014 15:01:59 -0700 Subject: [PATCH] Pass version and tag directives to HandleDocumentStart --- src/yaml/parsers.hh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/yaml/parsers.hh b/src/yaml/parsers.hh index 5f52153..9bb2fd5 100644 --- a/src/yaml/parsers.hh +++ b/src/yaml/parsers.hh @@ -32,8 +32,12 @@ struct Parser typedef std::shared_ptr Ptr; typedef std::stack Stack; + typedef yaml_version_directive_t VersionDirective; typedef yaml_mark_t Mark; + struct TagDirective; + typedef std::list TagDirectiveList; + struct TagDirective { std::string handle; std::string prefix; @@ -108,8 +112,10 @@ struct Parser /** * Handle a DOCUMENT-START event. * - * @param [in] versionDirective TODO - * @param [in] tagDirectives TODO + * @param [in] versionDirective The YAML version of this document + * @param [in] tagDirectives A list of tag directives defined for + * this document. Currently unimplemented; + * this should be an empty list. * @param [in] implicit Is the start of the document implicitly * specified? * @param [in] startMark The start of the event @@ -117,8 +123,8 @@ struct Parser * @returns `true` or `false` indicating whether the event was successfully * handled */ - virtual bool HandleDocumentStart(/* TODO: Version directive ,*/ - /* TODO: Tag directive list ,*/ + virtual bool HandleDocumentStart(const VersionDirective versionDirective, + const TagDirectiveList& tagDirectives, bool implicit, const Mark& startMark, const Mark& endMark);