fix nested vcm elements

This commit is contained in:
MihailRis 2026-01-08 22:17:34 +03:00
parent ce6bfe75a5
commit d341a48938

View file

@ -383,7 +383,11 @@ public:
void parseSubElements(Node& node) { void parseSubElements(Node& node) {
skipWhitespace(); skipWhitespace();
while (hasNext()) { while (hasNext()) {
if (peek() != '@') { char c = peek();
if (c == '}') {
break;
}
if (c != '@') {
throw error("unexpected character in element"); throw error("unexpected character in element");
} }
nextChar(); nextChar();
@ -402,14 +406,12 @@ public:
if (!hasNext()) { if (!hasNext()) {
break; break;
} }
char c = peek(); c = peek();
if (c == '{') { if (c == '{') {
nextChar(); nextChar();
parseSubElements(*subnode); parseSubElements(*subnode);
expect('}'); expect('}');
skipWhitespace(); skipWhitespace();
} else if (c == '}') {
break;
} }
} }
} }