C# Класс 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 .

Наследование: AstNode
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

GetInitializer() публичный Метод

Returns the initial value, or null if not provided
public GetInitializer ( ) : AstNode
Результат AstNode

GetTarget() публичный Метод

Returns the variable name or destructuring form
public GetTarget ( ) : AstNode
Результат AstNode

IsDestructuring() публичный Метод

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
Результат bool

SetInitializer() публичный Метод

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 /// . ///
Результат void

SetNodeType() публичный Метод

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
Результат void

SetTarget() публичный Метод

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
Результат void

ToSource() публичный Метод

public ToSource ( int depth ) : string
depth int
Результат string

VariableInitializer() публичный Метод

public VariableInitializer ( ) : System
Результат System

VariableInitializer() публичный Метод

public VariableInitializer ( int pos ) : System
pos int
Результат System

VariableInitializer() публичный Метод

public VariableInitializer ( int pos, int len ) : System
pos int
len int
Результат System

Visit() публичный Метод

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
Результат void