yang parser CHANGE move validation of enum name to separate function
so it can be reused in yin parser
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index 2d03115..17bae89 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -174,7 +174,7 @@
void lysp_sort_revisions(struct lysp_revision *revs);
/**
- * @brief Find type specified type definition
+ * @brief Find type specified type definition.
*
* @param[in] id Name of the type including possible prefix. Module where the prefix is being searched is start_module.
* @param[in] start_node Context node where the type is being instantiated to be able to search typedefs in parents.
@@ -188,6 +188,17 @@
LY_DATA_TYPE *type, const struct lysp_tpdf **tpdf, struct lysp_node **node, struct lysp_module **module);
/**
+ * @brief Validate enum name.
+ *
+ * @param[in] ctx yang parser context for logging.
+ * @param[in] name String to check.
+ * @param[in] name_len Length of name.
+ *
+ * @return LY_ERR values
+ */
+LY_ERR lysp_check_enum_name(struct lys_parser_ctx *ctx, char *name, size_t name_len);
+
+/**
* @brief Find and parse module of the given name.
*
* @param[in] ctx libyang context.