Пример #1
0
        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);
        }
Пример #2
0
        public IEnumerable <SymbolLValue> GetLValues(OperandsList operands)
        {
            var lvalues = Enumerable.Empty <SymbolLValue>();

            return
                (operands
                 .Operands
                 .OfType <LanguageValueAccess>()
                 .Aggregate(
                     lvalues,
                     (current, operand) => current.Concat((operand).AccessLValues)
                     ));
        }