C# Class Rhino.Ast.VariableInitializer

A variable declaration or initializer, part of a VariableDeclaration expression. The variable "target" can be a simple name or a destructuring form. The initializer, if present, can be any expression.

Node type is one of Rhino.Token.VAR , Rhino.Token.CONST , or Rhino.Token.LET .

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

Méthodes publiques

Méthode Description
GetInitializer ( ) : AstNode

Returns the initial value, or null if not provided

GetTarget ( ) : AstNode

Returns the variable name or destructuring form

IsDestructuring ( ) : bool

Returns true if this is a destructuring assignment.

Returns true if this is a destructuring assignment. If so, the initializer must be non- null .

SetInitializer ( AstNode initializer ) : void

Sets the initial value expression, and sets its parent to this node.

Sets the initial value expression, and sets its parent to this node.

SetNodeType ( int nodeType ) : void

Sets the node type.

Sets the node type.

SetTarget ( AstNode target ) : void

Sets the variable name or destructuring form, and sets its parent to this node.

Sets the variable name or destructuring form, and sets its parent to this node.

ToSource ( int depth ) : string
VariableInitializer ( ) : System
VariableInitializer ( int pos ) : System
VariableInitializer ( int pos, int len ) : System
Visit ( NodeVisitor v ) : void

Visits this node, then the target expression, then the initializer expression if present.

Visits this node, then the target expression, then the initializer expression if present.

Method Details

GetInitializer() public méthode

Returns the initial value, or null if not provided
public GetInitializer ( ) : AstNode
Résultat AstNode

GetTarget() public méthode

Returns the variable name or destructuring form
public GetTarget ( ) : AstNode
Résultat AstNode

IsDestructuring() public méthode

Returns true if this is a destructuring assignment.
Returns true if this is a destructuring assignment. If so, the initializer must be non- null .
public IsDestructuring ( ) : bool
Résultat bool

SetInitializer() public méthode

Sets the initial value expression, and sets its parent to this node.
Sets the initial value expression, and sets its parent to this node.
public SetInitializer ( AstNode initializer ) : void
initializer AstNode /// the initial value. May be /// null /// . ///
Résultat void

SetNodeType() public méthode

Sets the node type.
Sets the node type.
/// if /// nodeType /// is not one of /// Rhino.Token.VAR /// , /// Rhino.Token.CONST /// , or /// Rhino.Token.LET ///
public SetNodeType ( int nodeType ) : void
nodeType int
Résultat void

SetTarget() public méthode

Sets the variable name or destructuring form, and sets its parent to this node.
Sets the variable name or destructuring form, and sets its parent to this node.
/// if target is /// null ///
public SetTarget ( AstNode target ) : void
target AstNode
Résultat void

ToSource() public méthode

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

VariableInitializer() public méthode

public VariableInitializer ( ) : System
Résultat System

VariableInitializer() public méthode

public VariableInitializer ( int pos ) : System
pos int
Résultat System

VariableInitializer() public méthode

public VariableInitializer ( int pos, int len ) : System
pos int
len int
Résultat System

Visit() public méthode

Visits this node, then the target expression, then the initializer expression if present.
Visits this node, then the target expression, then the initializer expression if present.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Résultat void