Skip to content
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

Fix handling of complex nested definitions #51

Merged
merged 6 commits into from
Sep 26, 2024

Conversation

mikee47
Copy link
Owner

@mikee47 mikee47 commented Sep 26, 2024

This PR aims to resolve the issues raised in #50.

Verify use of store annotation

Must only be present on a root object. Code generator raises an exception if, for example, this annotation is found on an array.

Fix type information namespace

This is incorrectly generated for nested object definitions.

Nested objects missing default constructors

Required for exception conditions, such as accessing an invalid object type on a Union.

Code generator confuses is_store and is_root

is_root and is_store both return True for children of database.
This messes up global definitions.
Use a member variable for is_store and fix is_root implementation.

Complex nested objects require (object, prop, offset) constructor

This is required so a Union can return the embedded object type.

@mikee47 mikee47 force-pushed the fix/complex-nested-definitions branch from ecffec6 to 8c4762b Compare September 26, 2024 13:48
@mikee47 mikee47 merged commit c425be1 into develop Sep 26, 2024
26 checks passed
@mikee47 mikee47 deleted the fix/complex-nested-definitions branch September 26, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant