If I have a file format that has a self-describing, potentially recursive nature, how can I define that in an 010 template? For example: A file composed of a sequence of structures that each have a header that defined the type and one of those types was a list that could contain those same structure, like this pseudo-code:
struct foo {
string name;
string type;
int length;
switch (type) {
case “uint”:
DWORD value;
break;
case “list”:
foo value[length];
}
};
In this case, the use of “foo” in the case for “list” causes a syntax error, presumably because it’s not yet defined. I also don’t seem to be able to predefine a prototype for it.