This is an automated email from the ASF dual-hosted git repository.
aharui 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 dc182cc emit definitions in conditional blocks (childcount is 0 if
conditional is disabled). Fixes #72.
dc182cc is described below
commit dc182ccf2c4747c3f130b8edf645ce818e910591
Author: Alex Harui <[email protected]>
AuthorDate: Mon Feb 4 10:32:29 2019 -0800
emit definitions in conditional blocks (childcount is 0 if conditional is
disabled). Fixes #72.
---
.../org/apache/royale/compiler/internal/tree/as/ClassNode.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ClassNode.java
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ClassNode.java
index 38e094b..bfc65ba 100644
---
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ClassNode.java
+++
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/ClassNode.java
@@ -361,6 +361,16 @@ public class ClassNode extends MemberedNode implements
IClassNode
{
if (contentsNode.getChild(i) instanceof IDefinitionNode)
names.add(((IDefinitionNode)contentsNode.getChild(i)));
+ else if (contentsNode.getChild(i).getNodeID() ==
ASTNodeID.ConfigBlockID)
+ {
+ ConfigConditionBlockNode configNode =
(ConfigConditionBlockNode)contentsNode.getChild(i);
+ int configChildCount = configNode.getChildCount();
+ for (int j = 0; j < configChildCount; j++)
+ {
+ if (configNode.getChild(j) instanceof IDefinitionNode)
+ names.add(((IDefinitionNode)configNode.getChild(j)));
+ }
+ }
}
return names.toArray(new IDefinitionNode[0]);
}