This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new c03be24bc MXMLRoyaleEmitter: fix missing comma after childDescriptors
with children-as-data=false if there are 0 child descriptors
c03be24bc is described below
commit c03be24bc3941a5a1a298b0b1b70974567710eae
Author: Josh Tynjala <[email protected]>
AuthorDate: Mon May 4 16:00:31 2026 -0700
MXMLRoyaleEmitter: fix missing comma after childDescriptors with
children-as-data=false if there are 0 child descriptors
Followup to commit a05d8400c466da4bebebb04e0f99415e14c3a5ab
---
.../codegen/mxml/royale/MXMLRoyaleEmitter.java | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
index 505cc1692..581dd3a56 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
@@ -5397,11 +5397,6 @@ public class MXMLRoyaleEmitter extends MXMLEmitter
implements
int childDescriptorCount = 0;
if (node.isContainer())
{
- write("childDescriptors");
- writeToken(ASEmitterTokens.COLON);
- indentPush();
- writeNewline(ASEmitterTokens.SQUARE_OPEN);
-
// instance nodes not added to declarations will be children
for (int i = 0; i < node.getChildCount(); i++)
{
@@ -5414,14 +5409,24 @@ public class MXMLRoyaleEmitter extends MXMLEmitter
implements
write(ASEmitterTokens.COMMA);
writeNewline();
}
+ else
+ {
+ write("childDescriptors");
+ writeToken(ASEmitterTokens.COLON);
+ indentPush();
+ writeNewline(ASEmitterTokens.SQUARE_OPEN);
+ }
childDescriptorCount++;
emitUIComponentDescriptor(instanceNode);
}
}
- indentPop();
- writeNewline();
- write(ASEmitterTokens.SQUARE_CLOSE);
+ if (childDescriptorCount > 0)
+ {
+ indentPop();
+ writeNewline();
+ write(ASEmitterTokens.SQUARE_CLOSE);
+ }
}
if (node instanceof IMXMLInstanceNode)