statement parser CHANGE finish statement parser for generic extension instances
To simplify review, only the statement parser is extended and it is not
integrated with the compilation proces, which is a complex change and
will be provided in a separated commit.
Fixes #1333
diff --git a/src/schema_compile.c b/src/schema_compile.c
index fc957ba..d0c2976 100644
--- a/src/schema_compile.c
+++ b/src/schema_compile.c
@@ -631,7 +631,7 @@
switch (stmt->kw) {
case LY_STMT_STATUS:
assert(substmts[u].cardinality < LY_STMT_CARD_SOME);
- LY_CHECK_ERR_GOTO(r = lysp_stmt_parse(ctx, stmt, stmt->kw, &substmts[u].storage, /* TODO */ NULL), ret = r, cleanup);
+ LY_CHECK_ERR_GOTO(r = lysp_stmt_parse(ctx, stmt, &substmts[u].storage, /* TODO */ NULL), ret = r, cleanup);
break;
case LY_STMT_UNITS: {
const char **units;
@@ -670,7 +670,7 @@
compiled = (void *)type;
}
- r = lysp_stmt_parse(ctx, stmt, stmt->kw, &parsed, NULL);
+ r = lysp_stmt_parse(ctx, stmt, &parsed, NULL);
LY_CHECK_ERR_GOTO(r, ret = r, cleanup);
r = lys_compile_type(ctx, NULL, flags ? *flags : 0, ext->name, parsed, (struct lysc_type **)compiled,
units && !*units ? units : NULL, NULL);