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

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

public Walk ( RelationalExpression node ) : object
node RelationalExpression
Результат object
        public override object Walk(RelationalExpression node)
        {
            var lv = node.LeftExpression.Accept(this);
            switch (node.Operator)
            {
                case TokenType.LessThan:
                    return OpLessThan(lv, node.RightExpression.Accept(this));
                case TokenType.LessThanOrEqual:
                    return OpLessThanOrEqual(lv, node.RightExpression.Accept(this));
                case TokenType.GreaterThan:
                    return OpGreaterThan(lv, node.RightExpression.Accept(this));
                case TokenType.GreaterThanOrEqual:
                    return OpGreaterThanOrEqual(lv, node.RightExpression.Accept(this));
                case TokenType.Is:
                    if (lv == null)
                        return new BikeBoolean(false);
                    var targetValue = node.RightExpression.Accept(this);
                    if (targetValue is BikeObject)
                    {
                        if (!(lv is BikeObject))
                            return new BikeBoolean(false);
                        return ((BikeObject) targetValue).IsPrototypeOf((BikeObject) lv);
                    }
                    if (targetValue is Type)
                        return new BikeBoolean(Is(lv, (Type)targetValue));
                    throw ErrorFactory.CreateTypeError("The right expression must be a Bike.Object or System.Type");
                default:
                    throw ErrorFactory.CreateInvalidProgramError("Invalid relational operator");
            }
        }

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 ( LeftAssignmentExpression 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 ( 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