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
파일 보기 프로젝트 열기: hazzik/Rhino.Net 1 사용 예제들

공개 메소드들

메소드 설명
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