public OperandsList ReplaceLValueByExpression(OperandsList oldOperands, SymbolLValue oldLvalue, ILanguageExpressionAtomic newExpr) { for (var i = 0; i < oldOperands.Operands.Count; i++) { var newOpExpr = ReplaceLValueByExpression(oldOperands.Operands[i], oldLvalue, newExpr); oldOperands.ChangeOperand(i, newOpExpr); } return(oldOperands); }
public IEnumerable <SymbolLValue> GetLValues(OperandsList operands) { var lvalues = Enumerable.Empty <SymbolLValue>(); return (operands .Operands .OfType <LanguageValueAccess>() .Aggregate( lvalues, (current, operand) => current.Concat((operand).AccessLValues) )); }