log CHANGE provide more descriptive error when parsing submodule instead of module
diff --git a/src/parser_yin.c b/src/parser_yin.c
index c2d7f71..0b82f95 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -5897,6 +5897,10 @@
/* check root element */
if (!yin->name || strcmp(yin->name, "module")) {
LOGVAL(LYE_INSTMT, LY_VLOG_NONE, NULL, yin->name);
+ if (ly_strequal("submodule", yin->name, 0)) {
+ LOGVAL(LYE_SPEC, LY_VLOG_NONE, NULL,
+ "Submodules are parsed automatically as includes to the main module, do not parse them separately.");
+ }
goto error;
}