-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested Subtypes #35
Comments
Forget me... I had it intended one level too shallow. :) |
spec_ruby_to_go: fix assert equal ordering
Hi, I wonder if this is already implemented, or I'm using it the wrong way. Follow is the example File test1.ksy meta:
id: test1
imports:
- test2
seq:
- id: test3
type: test2::test3 I got the following python, no import test2, and no test2.Test3 neither class Test1(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.test3 = self._root.Test3(self._io, self, self._root) However, if I use opaque-types as follows: File test1.ksy meta:
id: test1
ks-opaque-types: true
seq:
- id: test3
type: test2::test3 Then python code is: import test2
class Test1(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):
self._io = _io
self._parent = _parent
self._root = _root if _root else self
self._read()
def _read(self):
self.test3 = test2.self._root.Test3(self._io) |
Unfortuantely the addressing scheme is contoversal. Enums and their values names are separated with |
* Fix `_index` examples, add behavior of keys in repetition * Fix style in the "keys in repetition" section
Consider the following YAML type:
It'd be nice if we could support the "subtypes", that is
types
withintypes
. How is this done in Kaistruct today? Is everything top level?The text was updated successfully, but these errors were encountered: