C# Класс Rhino.Ast.ConditionalExpression

AST node representing the ternary operator.
AST node representing the ternary operator. Node type is Rhino.Token.HOOK .
ConditionalExpression : LogicalORExpression LogicalORExpression ? AssignmentExpression : AssignmentExpression
ConditionalExpressionNoIn : LogicalORExpressionNoIn LogicalORExpressionNoIn ? AssignmentExpression : AssignmentExpressionNoIn
Наследование: AstNode
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ConditionalExpression ( ) : System.Text
ConditionalExpression ( int pos ) : System.Text
ConditionalExpression ( int pos, int len ) : System.Text
GetColonPosition ( ) : int

Returns position of : token

GetFalseExpression ( ) : AstNode

Returns expression to evaluate if test is false

GetQuestionMarkPosition ( ) : int

Returns position of ? token

GetTestExpression ( ) : AstNode

Returns test expression

GetTrueExpression ( ) : AstNode

Returns expression to evaluate if test is true

HasSideEffects ( ) : bool
SetColonPosition ( int colonPosition ) : void

Sets position of : token

SetFalseExpression ( AstNode falseExpression ) : void

Sets expression to evaluate if test is false, and sets its parent to this node.

Sets expression to evaluate if test is false, and sets its parent to this node.

SetQuestionMarkPosition ( int questionMarkPosition ) : void

Sets position of ? token

SetTestExpression ( AstNode testExpression ) : void

Sets test expression, and sets its parent.

Sets test expression, and sets its parent.

SetTrueExpression ( AstNode trueExpression ) : void

Sets expression to evaluate if test is true, and sets its parent to this node.

Sets expression to evaluate if test is true, and sets its parent to this node.

ToSource ( int depth ) : string
Visit ( NodeVisitor v ) : void

Visits this node, then the test-expression, the true-expression, and the false-expression.

Visits this node, then the test-expression, the true-expression, and the false-expression.

Описание методов

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

public ConditionalExpression ( ) : System.Text
Результат System.Text

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

public ConditionalExpression ( int pos ) : System.Text
pos int
Результат System.Text

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

public ConditionalExpression ( int pos, int len ) : System.Text
pos int
len int
Результат System.Text

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

Returns position of : token
public GetColonPosition ( ) : int
Результат int

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

Returns expression to evaluate if test is false
public GetFalseExpression ( ) : AstNode
Результат AstNode

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

Returns position of ? token
public GetQuestionMarkPosition ( ) : int
Результат int

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

Returns test expression
public GetTestExpression ( ) : AstNode
Результат AstNode

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

Returns expression to evaluate if test is true
public GetTrueExpression ( ) : AstNode
Результат AstNode

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

public HasSideEffects ( ) : bool
Результат bool

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

Sets position of : token
public SetColonPosition ( int colonPosition ) : void
colonPosition int position of : token
Результат void

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

Sets expression to evaluate if test is false, and sets its parent to this node.
Sets expression to evaluate if test is false, and sets its parent to this node.
/// if /// falseExpression /// is /// null ///
public SetFalseExpression ( AstNode falseExpression ) : void
falseExpression AstNode expression to evaluate if test is false
Результат void

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

Sets position of ? token
public SetQuestionMarkPosition ( int questionMarkPosition ) : void
questionMarkPosition int position of ? token
Результат void

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

Sets test expression, and sets its parent.
Sets test expression, and sets its parent.
/// if testExpression is /// null ///
public SetTestExpression ( AstNode testExpression ) : void
testExpression AstNode test expression
Результат void

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

Sets expression to evaluate if test is true, and sets its parent to this node.
Sets expression to evaluate if test is true, and sets its parent to this node.
/// if expression is /// null ///
public SetTrueExpression ( AstNode trueExpression ) : void
trueExpression AstNode expression to evaluate if test is true
Результат void

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

public ToSource ( int depth ) : string
depth int
Результат string

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

Visits this node, then the test-expression, the true-expression, and the false-expression.
Visits this node, then the test-expression, the true-expression, and the false-expression.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Результат void