C# Class Rhino.Ast.LabeledStatement

A labeled statement.
A labeled statement. A statement can have more than one label. In this AST representation, all labels for a statement are collapsed into the "labels" list of a single LabeledStatement node.

Node type is Rhino.Token.EXPR_VOID .

Inheritance: AstNode
Show file Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
AddLabel ( Label label ) : void

Adds a label and sets its parent to this node.

Adds a label and sets its parent to this node.

GetFirstLabel ( ) : Label
GetLabelByName ( string name ) : Label

Returns label with specified name from the label list for this labeled statement.

Returns label with specified name from the label list for this labeled statement. Returns null if there is no label with that name in the list.

GetLabels ( ) : IList

Returns label list

GetStatement ( ) : AstNode

Returns the labeled statement

HasSideEffects ( ) : bool
LabeledStatement ( ) : System.Collections.Generic
LabeledStatement ( int pos ) : System.Collections.Generic
LabeledStatement ( int pos, int len ) : System.Collections.Generic
SetLabels ( IList labels ) : void

Sets label list, setting the parent of each label in the list.

Sets label list, setting the parent of each label in the list. Replaces any existing labels.

SetStatement ( AstNode statement ) : void

Sets the labeled statement, and sets its parent to this node.

Sets the labeled statement, and sets its parent to this node.

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

Visits this node, then each label in the label-list, and finally the statement.

Visits this node, then each label in the label-list, and finally the statement.

Method Details

AddLabel() public method

Adds a label and sets its parent to this node.
Adds a label and sets its parent to this node.
/// } if label is /// null ///
public AddLabel ( Label label ) : void
label Label
return void

GetFirstLabel() public method

public GetFirstLabel ( ) : Label
return Label

GetLabelByName() public method

Returns label with specified name from the label list for this labeled statement.
Returns label with specified name from the label list for this labeled statement. Returns null if there is no label with that name in the list.
public GetLabelByName ( string name ) : Label
name string
return Label

GetLabels() public method

Returns label list
public GetLabels ( ) : IList
return IList

GetStatement() public method

Returns the labeled statement
public GetStatement ( ) : AstNode
return AstNode

HasSideEffects() public method

public HasSideEffects ( ) : bool
return bool

LabeledStatement() public method

public LabeledStatement ( ) : System.Collections.Generic
return System.Collections.Generic

LabeledStatement() public method

public LabeledStatement ( int pos ) : System.Collections.Generic
pos int
return System.Collections.Generic

LabeledStatement() public method

public LabeledStatement ( int pos, int len ) : System.Collections.Generic
pos int
len int
return System.Collections.Generic

SetLabels() public method

Sets label list, setting the parent of each label in the list.
Sets label list, setting the parent of each label in the list. Replaces any existing labels.
/// } if labels is /// null ///
public SetLabels ( IList labels ) : void
labels IList
return void

SetStatement() public method

Sets the labeled statement, and sets its parent to this node.
Sets the labeled statement, and sets its parent to this node.
/// if /// statement /// is /// null ///
public SetStatement ( AstNode statement ) : void
statement AstNode
return void

ToSource() public method

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

Visit() public method

Visits this node, then each label in the label-list, and finally the statement.
Visits this node, then each label in the label-list, and finally the statement.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
return void