C# Class Rhino.Ast.CatchClause

Node representing a catch-clause of a try-statement.
Node representing a catch-clause of a try-statement. Node type is Rhino.Token.CATCH .
CatchClause : catch ( Identifier [if Expression] ) Block
Inheritance: AstNode
Show file Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
CatchClause ( ) : System.Text
CatchClause ( int pos ) : System.Text
CatchClause ( int pos, int len ) : System.Text
GetBody ( ) : Block

Returns catch body

GetCatchCondition ( ) : AstNode

Returns catch condition node, if present

GetIfPosition ( ) : int

Returns position of "if" keyword

GetLp ( ) : int

Returns left paren position

GetRp ( ) : int

Returns right paren position

GetVarName ( ) : Name

Returns catch variable node

SetBody ( Block body ) : void

Sets catch body, and sets its parent to this node.

Sets catch body, and sets its parent to this node.

SetCatchCondition ( AstNode catchCondition ) : void

Sets catch condition node, and sets its parent to this node.

Sets catch condition node, and sets its parent to this node.

SetIfPosition ( int ifPosition ) : void

Sets position of "if" keyword

SetLp ( int lp ) : void

Sets left paren position

SetParens ( int lp, int rp ) : void

Sets both paren positions

SetRp ( int rp ) : void

Sets right paren position

SetVarName ( Name varName ) : void

Sets catch variable node, and sets its parent to this node.

Sets catch variable node, and sets its parent to this node.

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

Visits this node, the catch var name node, the condition if non- null , and the catch body.

Method Details

CatchClause() public method

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

CatchClause() public method

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

CatchClause() public method

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

GetBody() public method

Returns catch body
public GetBody ( ) : Block
return Block

GetCatchCondition() public method

Returns catch condition node, if present
public GetCatchCondition ( ) : AstNode
return AstNode

GetIfPosition() public method

Returns position of "if" keyword
public GetIfPosition ( ) : int
return int

GetLp() public method

Returns left paren position
public GetLp ( ) : int
return int

GetRp() public method

Returns right paren position
public GetRp ( ) : int
return int

GetVarName() public method

Returns catch variable node
public GetVarName ( ) : Name
return Name

SetBody() public method

Sets catch body, and sets its parent to this node.
Sets catch body, and sets its parent to this node.
/// if body is /// null ///
public SetBody ( Block body ) : void
body Block
return void

SetCatchCondition() public method

Sets catch condition node, and sets its parent to this node.
Sets catch condition node, and sets its parent to this node.
public SetCatchCondition ( AstNode catchCondition ) : void
catchCondition AstNode /// catch condition node. Can be /// null /// . ///
return void

SetIfPosition() public method

Sets position of "if" keyword
public SetIfPosition ( int ifPosition ) : void
ifPosition int position of "if" keyword, if present, or -1
return void

SetLp() public method

Sets left paren position
public SetLp ( int lp ) : void
lp int
return void

SetParens() public method

Sets both paren positions
public SetParens ( int lp, int rp ) : void
lp int
rp int
return void

SetRp() public method

Sets right paren position
public SetRp ( int rp ) : void
rp int
return void

SetVarName() public method

Sets catch variable node, and sets its parent to this node.
Sets catch variable node, and sets its parent to this node.
/// if varName is /// null ///
public SetVarName ( Name varName ) : void
varName Name catch variable
return void

ToSource() public method

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

Visit() public method

Visits this node, the catch var name node, the condition if non- null , and the catch body.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
return void