Difficulties with mapping to a new language
I am having real difficulties developing the Nim back-end because Nim does not have any notion of nesting types/classes. I am simulating this with type naming.

The `DataType` structure in Kaitai Struct compiler does not carry any information about the parent type(s) and thus it seems impossible to generate such code without having to re-write everything from scratch. Even if I did re-write everything, it would be quite ugly since the provided structures from the yaml parsing are are not in the correct form to generate such code (so it would be hackish). For example I would just disregard the `DataType` structure altogether and work with `ClassSpec` to construct the type identifiers.

I imagine the same problem would rise with a C back-end. How can I deal with this?

Below is a rough example of how the generated Nim code would look like (there are omission for simplifying the demonstration):

```yaml
meta:
  id: nested_types
seq:
  - id: one
    type: subtype_a
  - id: two
    type: subtype_b
types:
  subtype_a:
    seq:
      - id: typed_at_root
        type: subtype_b
      - id: typed_here
        type: subtype_c
    types:
      subtype_c:
        seq:
          - id: value_c
            type: s1
  subtype_b:
    seq:
      - id: value_b
        type: s1
```
```nim
type
  NestedTypes = object
    one: NestedTypes_SubtypeA
    two: NestedTypes_SubtypeB
  NestedTypes_SubtypeA = object
    typed_at_root: NestedTypes_SubtypeB
    typed_here: NestedTypes_SubtypeA_subtypeC
  NestedTypes_SubtypeB = object
    value_b: s1
  NestedTypes_SubtypeA_subtypeC = object
    value_c: s1
```