YANG parser BUGFIX processing ';', '{' and '}' as keywords
diff --git a/src/parser_yang.c b/src/parser_yang.c
index 77c7084..9a04440 100644
--- a/src/parser_yang.c
+++ b/src/parser_yang.c
@@ -884,15 +884,15 @@
case ';':
MOVE_INPUT(ctx, data, 1);
*kw = YANG_SEMICOLON;
- break;
+ goto success;
case '{':
MOVE_INPUT(ctx, data, 1);
*kw = YANG_LEFT_BRACE;
- break;
+ goto success;
case '}':
MOVE_INPUT(ctx, data, 1);
*kw = YANG_RIGHT_BRACE;
- break;
+ goto success;
default:
break;
}
@@ -942,7 +942,7 @@
*kw = YANG_CUSTOM;
}
-
+success:
if (word_p) {
*word_p = (char *)word_start;
*word_len = *data - word_start;