We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1fa28d commit ac6cc54Copy full SHA for ac6cc54
1 file changed
src/nodes/core/StructNode.js
@@ -52,6 +52,21 @@ class StructNode extends Node {
52
53
}
54
55
+ _getChildren() {
56
+
57
+ // Ensure struct type is the last child for correct code generation order
58
59
+ const children = super._getChildren();
60
61
+ const structTypeProperty = children.find( child => child.childNode === this.structTypeNode );
62
63
+ children.splice( children.indexOf( structTypeProperty ), 1 );
64
+ children.push( structTypeProperty );
65
66
+ return children;
67
68
+ }
69
70
generate( builder ) {
71
72
const nodeVar = builder.getVarFromNode( this );
0 commit comments