tree schema helpers REFACTOR
merge similar functions from yin and yang parser into one helper function
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index e62c4da..a35a594 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -685,6 +685,12 @@
 
 /**
  * @brief match yang keyword
+ *
+ * param[in] ctx yang parser context for logging, can be NULL if keyword is from YIN data.
+ * param[in,out] data Data to read from, always moved to currently handled character.
+ *
+ * return yang_keyword values.
  */
-enum yang_keyword match_keyword(const char *data, size_t len, size_t prefix_len);
+enum yang_keyword match_kw(struct lys_parser_ctx *ctx, const char **data);
+
 #endif /* LY_TREE_SCHEMA_INTERNAL_H_ */