Bike.Interpreter.Interpreter.Walk C# (CSharp) Метод

Walk() публичный Метод

public Walk ( LeftAssignmentExpression node ) : object
node LeftAssignmentExpression
Результат object
        public override object Walk(LeftAssignmentExpression node)
        {
            // Identifier, resolve from scope
            if (node.Variable is Identifier)
            {
                var scope = Context.CurrentFrame;
                var var = ((Identifier)node.Variable);
                var suffix = new PropertyReferenceSuffix { Identifier = var };
                var lvThunk = (Func<object>)(() => var.Accept(this));
                var rvThunk = (Func<object>)(() => node.Operand.Accept(this));
                return AssignSwitch(node.Operator.Text, scope, suffix, lvThunk, rvThunk);
            }
            else
            {
                var suffixes = node.Variable is MemberExpression
                                           ? ((MemberExpression)node.Variable).Suffixes
                                           : ((CallExpression)node.Variable).Suffixes;
                var secondLastObject = node.Variable is MemberExpression
                                           ? Member((MemberExpression)node.Variable, suffixes.ExceptLast())
                                           : Call((CallExpression)node.Variable, suffixes.ExceptLast());
                var lvThunk = (Func<object>)(() =>
                    node.Variable is MemberExpression
                                           ? Member((MemberExpression)node.Variable, suffixes)
                                           : Call((CallExpression)node.Variable, suffixes));
                var rvThunk = (Func<object>) (() => node.Operand.Accept(this));
                var suffix = suffixes[suffixes.Count - 1];

                // Static .NET, Console.Out = ...)
                if (secondLastObject is Type)
                {
                    return AssignSwitch(node.Operator.Text, secondLastObject, suffix, lvThunk, rvThunk, true);
                }
                return AssignSwitch(node.Operator.Text, secondLastObject, suffix, lvThunk, rvThunk);
            }
        }

Same methods

Interpreter::Walk ( AdditiveExpression node ) : object
Interpreter::Walk ( AndExpression node ) : object
Interpreter::Walk ( ArrayLiteral node ) : object
Interpreter::Walk ( BreakStatement node ) : object
Interpreter::Walk ( CallExpression node ) : object
Interpreter::Walk ( CaseClause node ) : object
Interpreter::Walk ( ConditionalExpression node ) : object
Interpreter::Walk ( EmptyStatement node ) : object
Interpreter::Walk ( EqualityExpression node ) : object
Interpreter::Walk ( ExecExpression node ) : object
Interpreter::Walk ( Expression node ) : object
Interpreter::Walk ( ExpressionStatement node ) : object
Interpreter::Walk ( ForInStatement node ) : object
Interpreter::Walk ( FunctionDeclaration node ) : object
Interpreter::Walk ( FunctionExpression node ) : object
Interpreter::Walk ( Identifier node ) : object
Interpreter::Walk ( IfStatement node ) : object
Interpreter::Walk ( IndexSuffix node ) : object
Interpreter::Walk ( LoadStatement node ) : object
Interpreter::Walk ( MemberExpression node ) : object
Interpreter::Walk ( MultiplicativeExpression node ) : object
Interpreter::Walk ( NextStatement node ) : object
Interpreter::Walk ( ObjectLiteral node ) : object
Interpreter::Walk ( OrExpression node ) : object
Interpreter::Walk ( PrimitiveLiteral node ) : object
Interpreter::Walk ( RelationalExpression node ) : object
Interpreter::Walk ( ReturnStatement node ) : object
Interpreter::Walk ( SelfExpression node ) : object
Interpreter::Walk ( SourceElements node ) : object
Interpreter::Walk ( SourceUnitTree node ) : object
Interpreter::Walk ( StatementBlock node ) : object
Interpreter::Walk ( SwitchStatement node ) : object
Interpreter::Walk ( ThrowStatement node ) : object
Interpreter::Walk ( TryStatement node ) : object
Interpreter::Walk ( TypeDescriptor node ) : object
Interpreter::Walk ( TypeDescriptorSuffix node ) : object
Interpreter::Walk ( UnaryExpression node ) : object
Interpreter::Walk ( VariableDeclaration node ) : object
Interpreter::Walk ( VariableStatement node ) : object
Interpreter::Walk ( WhileStatement node ) : object