@Override
public Node convert(Node node)
{
if ( ! Var.isVar(node) )
return node ;
Var var = (Var)node ;
String varName = var.getName() ;
if ( repeatedly )
{
while ( varName.startsWith(varPrefix) )
varName = varName.substring(varPrefix.length()) ;
}
else
{
if ( varName.startsWith(varPrefix) )
varName = varName.substring(varPrefix.length()) ;
}
if ( varName == var.getName() )
return node ;
return Var.alloc(varName) ;
}