-(defun parse-slot (slot)
- (destructuring-bind (name type &key count initform) slot
- (make-var-structure-slot :name name :type type :count count :initform initform)))
+(defun set-variant-result-structure (var-structure)
+ (setf (var-structure-resulting-cstruct-description var-structure)
+ (make-cstruct-description
+ :name
+ (var-structure-name var-structure)
+ :slots
+ (append
+ (when (var-structure-parent var-structure)
+ (cstruct-description-slots (var-structure-resulting-cstruct-description (var-structure-parent var-structure))))
+ (var-structure-slots var-structure))))
+ (iter (for variant in (var-structure-variants var-structure))
+ (for child-var-structure = (var-structure-variant-structure variant))
+ (set-variant-result-structure child-var-structure)))