if (parent instanceof BlockNode)
{
IASNode node = parent.getParent();
if (node instanceof MemberedNode)
{
BlockNode contents = ((MemberedNode)node).getScopedNode();
int childCount = contents.getChildCount();
boolean found = false;
for (int i = 0; i < childCount; i++)
{
IASNode child = contents.getChild(i);
if (found)
{
if (child instanceof IDefinitionNode)
{
decoratedNode = (IDefinitionNode)child;
if (child instanceof ClassNode)
{
analyze(EnumSet.of(PostProcessStep.POPULATE_SCOPE), ((ClassNode)child).getScopedNode().getASScope(), new ArrayList<ICompilerProblem>(0));
}
if (child instanceof BaseDefinitionNode)
{
((BaseDefinitionNode)child).setMetaTags(this);
}
break;
}
}
else
{
if (child == this)
{
found = true;
}
}
}
//we're still null, so let's loop through backwards to see if we can find the node we are decorating
//this could happen in MXML land when the mx:MetaData block comes after a script/event block
if (decoratedNode == null && found)
{
for (int i = childCount - 1; i >= 0; i--)
{
IASNode child = contents.getChild(i);
if (child instanceof IDefinitionNode)
{
decoratedNode = (IDefinitionNode)child;
if (child instanceof ClassNode)
{