mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 14:31:50 +00:00
fix nested vcm elements
This commit is contained in:
parent
ce6bfe75a5
commit
d341a48938
1 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue