* @return the array list
*/
private Environment filterVars(
final HaxeTree nodeToStart, final String prefix)
{
Environment result = new Environment();
HaxeTree parent = nodeToStart.getParent();
if (parent == null)
{
return result;
}
result.putAll(filterVars(parent, prefix));
for (HaxeTree commonTree : parent.getAllChildren())
{
if (commonTree.getText().startsWith(prefix)
&& (commonTree instanceof Declaration
|| commonTree instanceof Class
|| commonTree instanceof Function))
{
result.put(commonTree);
}
}
return result;
}