/** * Make an AdjacentTextNodeMerger expression with a given operand, or a simpler equivalent expression if appropriate * * @param base the operand expression * @return an AdjacentTextNodeMerger or equivalent expression */ public static Expression makeAdjacentTextNodeMerger(Expression base) { if (base instanceof Literal && ((Literal) base).getValue() instanceof AtomicSequence) { return base; } else { return new AdjacentTextNodeMerger(base); } }
/** * Make an AdjacentTextNodeMerger expression with a given operand, or a simpler equivalent expression if appropriate * * @param base the operand expression * @return an AdjacentTextNodeMerger or equivalent expression */ public static Expression makeAdjacentTextNodeMerger(Expression base) { if (base instanceof Literal && ((Literal) base).getValue() instanceof AtomicSequence) { return base; } else { return new AdjacentTextNodeMerger(base); } }
/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { AdjacentTextNodeMerger a2 = new AdjacentTextNodeMerger(getBaseExpression().copy(rebindings)); ExpressionTool.copyLocationInfo(this, a2); return a2; }
/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { AdjacentTextNodeMerger a2 = new AdjacentTextNodeMerger(getBaseExpression().copy(rebindings)); ExpressionTool.copyLocationInfo(this, a2); return a2; }
Choose choose = (Choose) getBaseExpression(); for (int i = 0; i < choose.size(); i++) { AdjacentTextNodeMerger atm2 = new AdjacentTextNodeMerger(choose.getAction(i)); choose.setAction(i, atm2.typeCheck(visitor, contextInfo));
Choose choose = (Choose) getBaseExpression(); for (int i = 0; i < choose.size(); i++) { AdjacentTextNodeMerger atm2 = new AdjacentTextNodeMerger(choose.getAction(i)); choose.setAction(i, atm2.typeCheck(visitor, contextInfo));