C# Class Rhino.Ast.ElementGet

AST node for an indexed property reference, such as foo['bar'] or foo[2] . This is sometimes called an "element-get" operation, hence the name of the node.

Node type is Rhino.Token.GETELEM .

The node bounds extend from the beginning position of the target through the closing right-bracket. In the presence of a syntax error, the right bracket position is -1, and the node ends at the end of the element expression.

Inheritance: AstNode
Afficher le fichier Open project: hazzik/Rhino.Net Class Usage Examples

Méthodes publiques

Méthode Description
ElementGet ( ) : System.Text
ElementGet ( AstNode target, AstNode element ) : System.Text
ElementGet ( int pos ) : System.Text
ElementGet ( int pos, int len ) : System.Text
GetElement ( ) : AstNode

Returns the element being accessed

GetLb ( ) : int

Returns left bracket position

GetRb ( ) : int

Returns right bracket position, -1 if missing

GetTarget ( ) : AstNode

Returns the object on which the element is being fetched.

Returns the object on which the element is being fetched.

SetElement ( AstNode element ) : void

Sets the element being accessed, and sets its parent to this node.

Sets the element being accessed, and sets its parent to this node.

SetLb ( int lb ) : void

Sets left bracket position

SetParens ( int lb, int rb ) : void
SetRb ( int rb ) : void

Sets right bracket position, -1 if not present

SetTarget ( AstNode target ) : void

Sets target object, and sets its parent to this node.

Sets target object, and sets its parent to this node.

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

Visits this node, the target, and the index expression.

Visits this node, the target, and the index expression.

Method Details

ElementGet() public méthode

public ElementGet ( ) : System.Text
Résultat System.Text

ElementGet() public méthode

public ElementGet ( AstNode target, AstNode element ) : System.Text
target AstNode
element AstNode
Résultat System.Text

ElementGet() public méthode

public ElementGet ( int pos ) : System.Text
pos int
Résultat System.Text

ElementGet() public méthode

public ElementGet ( int pos, int len ) : System.Text
pos int
len int
Résultat System.Text

GetElement() public méthode

Returns the element being accessed
public GetElement ( ) : AstNode
Résultat AstNode

GetLb() public méthode

Returns left bracket position
public GetLb ( ) : int
Résultat int

GetRb() public méthode

Returns right bracket position, -1 if missing
public GetRb ( ) : int
Résultat int

GetTarget() public méthode

Returns the object on which the element is being fetched.
Returns the object on which the element is being fetched.
public GetTarget ( ) : AstNode
Résultat AstNode

SetElement() public méthode

Sets the element being accessed, and sets its parent to this node.
Sets the element being accessed, and sets its parent to this node.
/// if element is /// null ///
public SetElement ( AstNode element ) : void
element AstNode
Résultat void

SetLb() public méthode

Sets left bracket position
public SetLb ( int lb ) : void
lb int
Résultat void

SetParens() public méthode

public SetParens ( int lb, int rb ) : void
lb int
rb int
Résultat void

SetRb() public méthode

Sets right bracket position, -1 if not present
public SetRb ( int rb ) : void
rb int
Résultat void

SetTarget() public méthode

Sets target object, and sets its parent to this node.
Sets target object, and sets its parent to this node.
/// if target is /// null ///
public SetTarget ( AstNode target ) : void
target AstNode /// expression evaluating to the object upon which /// to do the element lookup ///
Résultat void

ToSource() public méthode

public ToSource ( int depth ) : string
depth int
Résultat string

Visit() public méthode

Visits this node, the target, and the index expression.
Visits this node, the target, and the index expression.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Résultat void