/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings variables whose binding needs to change */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { LetExpression let = new LetExpression(); ExpressionTool.copyLocationInfo(this, let); let.isIndexedVariable = isIndexedVariable; let.hasLoopingReference = hasLoopingReference; let.setNeedsEagerEvaluation(needsEagerEvaluation); let.setNeedsLazyEvaluation(needsLazyEvaluation); let.setVariableQName(variableName); let.setRequiredType(requiredType); let.setSequence(getSequence().copy(rebindings)); let.setInstruction(isInstruction()); Expression newAction = getAction().copy(rebindings); let.setAction(newAction); ExpressionTool.rebindVariableReferences(newAction, this, let); return let; }
/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings variables whose binding needs to change */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { LetExpression let = new LetExpression(); ExpressionTool.copyLocationInfo(this, let); let.isIndexedVariable = isIndexedVariable; let.hasLoopingReference = hasLoopingReference; let.setNeedsEagerEvaluation(needsEagerEvaluation); let.setNeedsLazyEvaluation(needsLazyEvaluation); let.setVariableQName(variableName); let.setRequiredType(requiredType); let.setSequence(getSequence().copy(rebindings)); let.setInstruction(isInstruction()); Expression newAction = getAction().copy(rebindings); let.setAction(newAction); ExpressionTool.rebindVariableReferences(newAction, this, let); return let; }
let.setInstruction(true); let.setRequiredType(var.getRequiredType()); let.setVariableQName(sourceBinding.getVariableQName());
let.setInstruction(true); let.setRequiredType(var.getRequiredType()); let.setVariableQName(sourceBinding.getVariableQName());