use of org.eclipse.wst.xml.xpath2.processor.internal.ast.Expr in project webtools.sourceediting by eclipse.
the class Normalizer method printVarExprPairs.
private void printVarExprPairs(Iterator i) {
while (i.hasNext()) {
VarExprPair pair = (VarExprPair) i.next();
QName var = pair.varname();
Expr e = pair.expr();
e.accept(this);
}
}
use of org.eclipse.wst.xml.xpath2.processor.internal.ast.Expr in project webtools.sourceediting by eclipse.
the class Normalizer method visit.
/**
* @param fex
* is the For expression.
* @return fex expression.
*/
public Object visit(ForExpr fex) {
ForExpr last = fex;
Expr ret = fex.expr();
int depth = 0;
for (Iterator i = fex.iterator(); i.hasNext(); ) {
VarExprPair ve = (VarExprPair) i.next();
// ok we got nested fors...
if (depth > 0) {
Collection pairs = new ArrayList();
pairs.add(ve);
ForExpr fe = new ForExpr(pairs, ret);
last.set_expr(fe);
last = fe;
}
depth++;
}
// normalize return value, and set it to the last for expr
ret.accept(this);
// get rid of the pairs in the parent (original) for
if (depth > 1)
fex.truncate_pairs();
return fex;
}
use of org.eclipse.wst.xml.xpath2.processor.internal.ast.Expr in project webtools.sourceediting by eclipse.
the class Normalizer method printExprs.
private void printExprs(Iterator i) {
while (i.hasNext()) {
Expr e = (Expr) i.next();
e.accept(this);
}
}
Aggregations