C# Класс Rhino.Ast.VariableDeclaration

A list of one or more var, const or let declarations.
A list of one or more var, const or let declarations. Node type is Rhino.Token.VAR , Rhino.Token.CONST or Rhino.Token.LET .

If the node is for var or const , the node position is the beginning of the var or const keyword. For let declarations, the node position coincides with the first VariableInitializer child.

A standalone variable declaration in a statement context returns true from its IsStatement() method.

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

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

Метод Описание
AddVariable ( VariableInitializer v ) : void

Adds a variable initializer node to the child list.

Adds a variable initializer node to the child list. Sets initializer node's parent to this node.

GetVariables ( ) : IList

Returns variable list.

Returns variable list. Never null .

IsConst ( ) : bool

Returns true if this is a Rhino.Token.CONST declaration.

IsLet ( ) : bool

Returns true if this is a Rhino.Token.LET declaration.

IsStatement ( ) : bool

Returns true if this node represents a statement.

Returns true if this node represents a statement.

IsVar ( ) : bool

Returns true if this is a var (not const or let ) declaration.

SetIsStatement ( bool isStatement ) : void

Set or unset the statement flag.

Set or unset the statement flag.

SetType ( int type ) : Node

Sets the node type and returns this node.

Sets the node type and returns this node.

SetVariables ( IList variables ) : void

Sets variable list

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

Visits this node, then each VariableInitializer child.

Приватные методы

Метод Описание
DeclTypeName ( ) : string

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

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

Adds a variable initializer node to the child list.
Adds a variable initializer node to the child list. Sets initializer node's parent to this node.
/// if v is /// null ///
public AddVariable ( VariableInitializer v ) : void
v VariableInitializer
Результат void

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

Returns variable list.
Returns variable list. Never null .
public GetVariables ( ) : IList
Результат IList

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

Returns true if this is a Rhino.Token.CONST declaration.
public IsConst ( ) : bool
Результат bool

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

Returns true if this is a Rhino.Token.LET declaration.
public IsLet ( ) : bool
Результат bool

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

Returns true if this node represents a statement.
Returns true if this node represents a statement.
public IsStatement ( ) : bool
Результат bool

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

Returns true if this is a var (not const or let ) declaration.
public IsVar ( ) : bool
Результат bool

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

Set or unset the statement flag.
Set or unset the statement flag.
public SetIsStatement ( bool isStatement ) : void
isStatement bool
Результат void

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

Sets the node type and returns this node.
Sets the node type and returns this node.
/// if /// declType /// is invalid ///
public SetType ( int type ) : Node
type int
Результат Node

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

Sets variable list
/// if variables list is /// null ///
public SetVariables ( IList variables ) : void
variables IList
Результат void

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

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

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

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

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

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

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

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

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

Visits this node, then each VariableInitializer child.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Результат void