C# Class 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
Inheritance: AstNode
Exibir arquivo Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
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.

Method Details

ConditionalExpression() public method

public ConditionalExpression ( ) : System.Text
return System.Text

ConditionalExpression() public method

public ConditionalExpression ( int pos ) : System.Text
pos int
return System.Text

ConditionalExpression() public method

public ConditionalExpression ( int pos, int len ) : System.Text
pos int
len int
return System.Text

GetColonPosition() public method

Returns position of : token
public GetColonPosition ( ) : int
return int

GetFalseExpression() public method

Returns expression to evaluate if test is false
public GetFalseExpression ( ) : AstNode
return AstNode

GetQuestionMarkPosition() public method

Returns position of ? token
public GetQuestionMarkPosition ( ) : int
return int

GetTestExpression() public method

Returns test expression
public GetTestExpression ( ) : AstNode
return AstNode

GetTrueExpression() public method

Returns expression to evaluate if test is true
public GetTrueExpression ( ) : AstNode
return AstNode

HasSideEffects() public method

public HasSideEffects ( ) : bool
return bool

SetColonPosition() public method

Sets position of : token
public SetColonPosition ( int colonPosition ) : void
colonPosition int position of : token
return void

SetFalseExpression() public method

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
return void

SetQuestionMarkPosition() public method

Sets position of ? token
public SetQuestionMarkPosition ( int questionMarkPosition ) : void
questionMarkPosition int position of ? token
return void

SetTestExpression() public method

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
return void

SetTrueExpression() public method

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
return void

ToSource() public method

public ToSource ( int depth ) : string
depth int
return string

Visit() public method

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
return void