diff --git a/src/parser_yang.c b/src/parser_yang.c
index cd11584..b47ef1b 100644
--- a/src/parser_yang.c
+++ b/src/parser_yang.c
@@ -28,6 +28,18 @@
 #include "context.h"
 #include "libyang.h"
 
+/**
+ * @brief Loop through all substatements providing, return if there are none.
+ *
+ * @param[in] CTX libyang context for logging.
+ * @param[in] DATA Raw data to read from.
+ * @param[out] KW YANG keyword read.
+ * @param[out] WORD Pointer to the keyword itself.
+ * @param[out] WORD_LEN Length of the keyword.
+ * @param[out] ERR Variable for error storing.
+ *
+ * @return In case there are no substatements or a fatal error encountered.
+ */
 #define YANG_READ_SUBSTMT_FOR(CTX, DATA, KW, WORD, WORD_LEN, ERR) \
     ERR = get_keyword(CTX, DATA, &KW, &WORD, &WORD_LEN); \
     LY_CHECK_RET(ERR); \
@@ -50,6 +62,19 @@
 static LY_ERR parse_list(struct ly_ctx *ctx, const char **data, struct lysp_node **siblings);
 static LY_ERR parse_grouping(struct ly_ctx *ctx, const char **data, struct lysp_grp **groupings);
 
+/**
+ * @brief Add another character to dynamic buffer, a low-level function.
+ *
+ * Enlarge if needed. Does not update \p buf_used !
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in] c Character to store.
+ * @param[in,out] buf Buffer to use, can be moved by realloc().
+ * @param[in,out] buf_len Current size of the buffer.
+ * @param[in] buf_used Currently used characters of the buffer.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 buf_add_char(struct ly_ctx *ctx, char c, char **buf, int *buf_len, int buf_used)
 {
@@ -63,6 +88,20 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Store a character. It depends whether in a dynamically-allocated buffer or just as a pointer to the data.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in] c Pointer to the character to store.
+ * @param[out] word_p Word pointer. If buffer (\p word_b) was not yet needed, it is just a pointer to the first
+ * stored character. If buffer was needed (\p word_b is non-NULL or \p need_buf is set), it is pointing to the buffer.
+ * @param[out] word_len Current length of the word pointed to by \p word_p.
+ * @param[in,out] word_b Word buffer. Is kept NULL as long as it is not needed (word is a substring of the data).
+ * @param[in,out] buf_len Current length of \p word_b.
+ * @param[in] need_buf Whether we need a buffer or not.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 buf_store_char(struct ly_ctx *ctx, const char *c, char **word_p, int *word_len, char **word_b, int *buf_len, int need_buf)
 {
@@ -101,6 +140,17 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Check that a character is correct and valid.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in] c Character to check.
+ * @param[in] arg Type of YANG keyword argument expected. Affects character validity.
+ * @param[in] first Whether the character is the first of the word. May affect validity.
+ * @param[in,out] prefix Set to 0 on first call. Used for internal tracking of a prefix presence.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 check_char(struct ly_ctx *ctx, char c, enum yang_arg arg, int first, int *prefix)
 {
@@ -141,6 +191,15 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Skip YANG comment in data.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] comment 1 for a one-line comment, 2 for a block comment.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 skip_comment(struct ly_ctx *ctx, const char **data, int comment)
 {
@@ -180,6 +239,22 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Read a quoted string from data.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] arg Type of YANG keyword argument expected.
+ * @param[out] word_p Pointer to the read quoted string.
+ * @param[out] word_b Pointer to a dynamically-allocated buffer holding the read quoted string. If not needed,
+ * set to NULL. Otherwise equal to \p word_p.
+ * @param[out] word_len Length of the read quoted string.
+ * @param[out] buf_len Length of the dynamically-allocated buffer \p word_b.
+ * @param[in] indent Current indent (number of YANG spaces). Needed for correct multi-line string
+ * indenation in the final quoted string.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 read_qstring(struct ly_ctx *ctx, const char **data, enum yang_arg arg, char **word_p, char **word_b, int *word_len,
              int *buf_len, int indent)
@@ -366,12 +441,18 @@
     return LY_SUCCESS;
 }
 
-/* read another word - character sequence without whitespaces (logs directly)
- * - there can be whitespaces if they are a part of string
- * - strings are always returned separately even if not separated by whitespaces
- * - strings are returned without ' or "
- * - strings divided by + are returned concatenated
- * - comments are skipped
+/**
+ * @brief Get another YANG string from the raw data.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] arg Type of YANG keyword argument expected.
+ * @param[out] word_p Pointer to the read string.
+ * @param[out] word_b Pointer to a dynamically-allocated buffer holding the read string. If not needed,
+ * set to NULL. Otherwise equal to \p word_p.
+ * @param[out] word_len Length of the read string.
+ *
+ * @return LY_ERR values.
  */
 static LY_ERR
 get_string(struct ly_ctx *ctx, const char **data, enum yang_arg arg, char **word_p, char **word_b, int *word_len)
@@ -484,6 +565,17 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Get another YANG keyword from the raw data.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[out] kw YANG keyword read.
+ * @param[out] word_p Pointer to the keyword in the data. Useful for extension instances.
+ * @param[out] word_len Length of the keyword in the data. Useful for extension instances.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 get_keyword(struct ly_ctx *ctx, const char **data, enum yang_keyword *kw, char **word_p, int *word_len)
 {
@@ -946,6 +1038,17 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Parse extension instance substatements.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] word Extension instance substatement name (keyword).
+ * @param[in] word_len Extension instance substatement name length.
+ * @param[in,out] child Children of this extension instance to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_ext_substmt(struct ly_ctx *ctx, const char **data, char *word, int word_len,
                   struct lysp_stmt **child)
@@ -989,6 +1092,19 @@
     return ret;
 }
 
+/**
+ * @brief Parse extension instance.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] ext_name Extension instance substatement name (keyword).
+ * @param[in] ext_name_len Extension instance substatement name length.
+ * @param[in] insubstmt Type of the keyword this extension instance is a substatement of.
+ * @param[in] insubstmt_index Index of the keyword instance this extension instance is a substatement of.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_ext(struct ly_ctx *ctx, const char **data, const char *ext_name, int ext_name_len, LYEXT_SUBSTMT insubstmt,
           uint32_t insubstmt_index, struct lysp_ext_instance **exts)
@@ -1027,6 +1143,20 @@
     return ret;
 }
 
+/**
+ * @brief Parse a generic text field without specific constraints. Those are contact, organization,
+ * description, etc...
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] substmt Type of this substatement.
+ * @param[in] substmt_index Index of this substatement.
+ * @param[in,out] value Place to store the parsed value.
+ * @param[in] arg Type of the YANG keyword argument (of the value).
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_text_field(struct ly_ctx *ctx, const char **data, LYEXT_SUBSTMT substmt, uint32_t substmt_index,
                  const char **value, enum yang_arg arg, struct lysp_ext_instance **exts)
@@ -1070,6 +1200,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the yang-version statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] mod Module to store the parsed information in.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_yangversion(struct ly_ctx *ctx, const char **data, struct lysp_module *mod)
 {
@@ -1116,6 +1255,17 @@
     return ret;
 }
 
+/**
+ * @brief Parse the belongs-to statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] belongsto Place to store the parsed value.
+ * @param[in,out] prefix Place to store the parsed belongs-to prefix value.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_belongsto(struct ly_ctx *ctx, const char **data, const char **belongsto, const char **prefix, struct lysp_ext_instance **exts)
 {
@@ -1166,6 +1316,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the revision-date statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] rev Array to store the parsed value in.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_revisiondate(struct ly_ctx *ctx, const char **data, char *rev, struct lysp_ext_instance **exts)
 {
@@ -1211,6 +1371,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the include statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] includes Parsed includes to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_include(struct ly_ctx *ctx, const char **data, struct lysp_include **includes)
 {
@@ -1259,6 +1428,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the import statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] imports Parsed imports to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_import(struct ly_ctx *ctx, const char **data, struct lysp_import **imports)
 {
@@ -1316,6 +1494,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the revision statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] revs Parsed revisions to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_revision(struct ly_ctx *ctx, const char **data, struct lysp_revision **revs)
 {
@@ -1363,6 +1550,18 @@
     return ret;
 }
 
+/**
+ * @brief Parse a generic text field that can have more instances such as base.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] substmt Type of this substatement.
+ * @param[in,out] texts Parsed values to add to.
+ * @param[in] arg Type of the expected argument.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_text_fields(struct ly_ctx *ctx, const char **data, LYEXT_SUBSTMT substmt, const char ***texts, enum yang_arg arg,
                   struct lysp_ext_instance **exts)
@@ -1405,6 +1604,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the config statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] flags Flags to add to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_config(struct ly_ctx *ctx, const char **data, uint16_t *flags, struct lysp_ext_instance **exts)
 {
@@ -1451,6 +1660,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the mandatory statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] flags Flags to add to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_mandatory(struct ly_ctx *ctx, const char **data, uint16_t *flags, struct lysp_ext_instance **exts)
 {
@@ -1497,6 +1716,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse a restriction such as range or length.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] restr_kw Type of this particular restriction.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_restr(struct ly_ctx *ctx, const char **data, enum yang_keyword restr_kw, struct lysp_restr *restr)
 {
@@ -1545,6 +1774,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse a restriction that can have more instances such as must.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] restr_kw Type of this particular restriction.
+ * @param[in,out] restrs Restrictions to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_restrs(struct ly_ctx *ctx, const char **data, enum yang_keyword restr_kw, struct lysp_restr **restrs)
 {
@@ -1555,6 +1794,16 @@
     return parse_restr(ctx, data, restr_kw, restr);
 }
 
+/**
+ * @brief Parse the status statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] flags Flags to add to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_status(struct ly_ctx *ctx, const char **data, uint16_t *flags, struct lysp_ext_instance **exts)
 {
@@ -1603,6 +1852,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the when statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] when_p When pointer to parse to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_when(struct ly_ctx *ctx, const char **data, struct lysp_when **when_p)
 {
@@ -1655,6 +1913,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the anydata or anyxml statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] kw Type of this particular keyword.
+ * @param[in,out] siblings Siblings to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_any(struct ly_ctx *ctx, const char **data, enum yang_keyword kw, struct lysp_node **siblings)
 {
@@ -1731,6 +1999,18 @@
     return ret;
 }
 
+/**
+ * @brief Parse the value or position statement. Substatement of type enum statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] val_kw Type of this particular keyword.
+ * @param[in,out] value Value to write to.
+ * @param[in,out] flags Flags to write to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_type_enum_value_pos(struct ly_ctx *ctx, const char **data, enum yang_keyword val_kw, int64_t *value, uint16_t *flags,
                           struct lysp_ext_instance **exts)
@@ -1800,6 +2080,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the enum or bit statement. Substatement of type statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] enum_kw Type of this particular keyword.
+ * @param[in,out] enums Enums or bits to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_type_enum(struct ly_ctx *ctx, const char **data, enum yang_keyword enum_kw, struct lysp_type_enum **enums)
 {
@@ -1855,6 +2145,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the fraction-digits statement. Substatement of type statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] fracdig Value to write to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_type_fracdigits(struct ly_ctx *ctx, const char **data, uint8_t *fracdig, struct lysp_ext_instance **exts)
 {
@@ -1913,6 +2213,17 @@
     return ret;
 }
 
+/**
+ * @brief Parse the require-instance statement. Substatement of type statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] reqinst Value to write to.
+ * @param[in,out] flags Flags to write to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_type_reqinstance(struct ly_ctx *ctx, const char **data, uint8_t *reqinst, uint16_t *flags,
                        struct lysp_ext_instance **exts)
@@ -1959,6 +2270,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the modifier statement. Substatement of type pattern statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] pat Value to write to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_type_pattern_modifier(struct ly_ctx *ctx, const char **data, const char **pat, struct lysp_ext_instance **exts)
 {
@@ -2011,6 +2332,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the pattern statement. Substatement of type statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] patterns Restrictions to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_type_pattern(struct ly_ctx *ctx, const char **data, struct lysp_restr **patterns)
 {
@@ -2071,6 +2401,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the type statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] type Type to wrote to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_type(struct ly_ctx *ctx, const char **data, struct lysp_type *type)
 {
@@ -2160,6 +2499,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the leaf statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] siblings Siblings to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_leaf(struct ly_ctx *ctx, const char **data, struct lysp_node **siblings)
 {
@@ -2251,6 +2599,17 @@
     return ret;
 }
 
+/**
+ * @brief Parse the max-elements statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] max Value to write to.
+ * @param[in,out] flags Flags to write to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_maxelements(struct ly_ctx *ctx, const char **data, uint32_t *max, uint16_t *flags, struct lysp_ext_instance **exts)
 {
@@ -2313,6 +2672,17 @@
     return ret;
 }
 
+/**
+ * @brief Parse the min-elements statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] min Value to write to.
+ * @param[in,out] flags Flags to write to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_minelements(struct ly_ctx *ctx, const char **data, uint32_t *min, uint16_t *flags, struct lysp_ext_instance **exts)
 {
@@ -2372,6 +2742,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the ordered-by statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] flags Flags to write to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_orderedby(struct ly_ctx *ctx, const char **data, uint16_t *flags, struct lysp_ext_instance **exts)
 {
@@ -2418,6 +2798,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the leaf-list statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] siblings Siblings to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_leaflist(struct ly_ctx *ctx, const char **data, struct lysp_node **siblings)
 {
@@ -2515,6 +2904,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the refine statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] refines Refines to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_refine(struct ly_ctx *ctx, const char **data, struct lysp_refine **refines)
 {
@@ -2584,6 +2982,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the typedef statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] typedefs Typedefs to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_typedef(struct ly_ctx *ctx, const char **data, struct lysp_tpdf **typedefs)
 {
@@ -2648,6 +3055,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the input or output statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in] kw Type of this particular keyword
+ * @param[in,out] inout_p Input/output pointer to write to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_inout(struct ly_ctx *ctx, const char **data, enum yang_keyword kw, struct lysp_action_inout **inout_p)
 {
@@ -2717,6 +3134,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the action statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] actions Actions to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_action(struct ly_ctx *ctx, const char **data, struct lysp_action **actions)
 {
@@ -2782,6 +3208,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the notification statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] notifs Notifications to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_notif(struct ly_ctx *ctx, const char **data, struct lysp_notif **notifs)
 {
@@ -2866,6 +3301,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the grouping statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] groupings Groupings to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_grouping(struct ly_ctx *ctx, const char **data, struct lysp_grp **groupings)
 {
@@ -2950,6 +3394,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the refine statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] augments Augments to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_augment(struct ly_ctx *ctx, const char **data, struct lysp_augment **augments)
 {
@@ -3037,6 +3490,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the uses statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] siblings Siblings to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_uses(struct ly_ctx *ctx, const char **data, struct lysp_node **siblings)
 {
@@ -3111,6 +3573,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the case statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] siblings Siblings to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_case(struct ly_ctx *ctx, const char **data, struct lysp_node **siblings)
 {
@@ -3201,6 +3672,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the choice statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] siblings Siblings to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_choice(struct ly_ctx *ctx, const char **data, struct lysp_node **siblings)
 {
@@ -3300,6 +3780,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the container statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] siblings Siblings to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_container(struct ly_ctx *ctx, const char **data, struct lysp_node **siblings)
 {
@@ -3412,6 +3901,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the list statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] siblings Siblings to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_list(struct ly_ctx *ctx, const char **data, struct lysp_node **siblings)
 {
@@ -3536,6 +4034,16 @@
     return ret;
 }
 
+/**
+ * @brief Parse the yin-element statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] flags Flags to write to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_yinelement(struct ly_ctx *ctx, const char **data, uint16_t *flags, struct lysp_ext_instance **exts)
 {
@@ -3582,6 +4090,17 @@
     return ret;
 }
 
+/**
+ * @brief Parse the yin-element statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] argument Value to write to.
+ * @param[in,out] flags Flags to write to.
+ * @param[in,out] exts Extension instances to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_argument(struct ly_ctx *ctx, const char **data, const char **argument, uint16_t *flags, struct lysp_ext_instance **exts)
 {
@@ -3626,6 +4145,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the extension statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] extensions Extensions to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_extension(struct ly_ctx *ctx, const char **data, struct lysp_ext **extensions)
 {
@@ -3677,6 +4205,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the deviate statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] deviates Deviates to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_deviate(struct ly_ctx *ctx, const char **data, struct lysp_deviate **deviates)
 {
@@ -3881,6 +4418,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the deviation statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] deviations Deviations to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_deviation(struct ly_ctx *ctx, const char **data, struct lysp_deviation **deviations)
 {
@@ -3935,6 +4481,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the feature statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] features Features to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_feature(struct ly_ctx *ctx, const char **data, struct lysp_feature **features)
 {
@@ -3986,6 +4541,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the identity statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] identities Identities to add to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_identity(struct ly_ctx *ctx, const char **data, struct lysp_ident **identities)
 {
@@ -4040,6 +4604,15 @@
     return ret;
 }
 
+/**
+ * @brief Parse the module or submodule statement.
+ *
+ * @param[in] ctx libyang context for logging.
+ * @param[in,out] data Data to read from, always moved to currently handled character.
+ * @param[in,out] mod Module to write to.
+ *
+ * @return LY_ERR values.
+ */
 static LY_ERR
 parse_sub_module(struct ly_ctx *ctx, const char **data, struct lysp_module *mod)
 {
