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

AST node for let statements and expressions.
AST node for let statements and expressions. Node type is Rhino.Token.LET or Rhino.Token.LETEXPR .

 LetStatement: let ( VariableDeclarationList ) Block LetExpression: let ( VariableDeclarationList ) Expression
Note that standalone let-statements with no parens or body block, such as let x=6, y=7; , are represented as a VariableDeclaration node of type Token.LET , wrapped with an ExpressionStatement .

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

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

Метод Описание
GetBody ( ) : AstNode

Returns body statement or expression.

Returns body statement or expression. Body is null if the form of the let statement is similar to a VariableDeclaration, with no curly-brace. (This form is used to define let-bound variables in the scope of the current block.)

GetLp ( ) : int

Returns left paren position, -1 if missing

GetRp ( ) : int

Returns right paren position, -1 if missing

GetVariables ( ) : VariableDeclaration

Returns variable list

LetNode ( ) : System.Text
LetNode ( int pos ) : System.Text
LetNode ( int pos, int len ) : System.Text
SetBody ( AstNode body ) : void

Sets body statement or expression.

Sets body statement or expression. Also sets the body parent to this node.

SetLp ( int lp ) : void

Sets left paren position

SetParens ( int lp, int rp ) : void

Sets both paren positions

SetRp ( int rp ) : void

Sets right paren position

SetVariables ( VariableDeclaration variables ) : void

Sets variable list.

Sets variable list. Sets list parent to this node.

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

Visits this node, the variable list, and if present, the body expression or statement.

Visits this node, the variable list, and if present, the body expression or statement.

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

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

Returns body statement or expression.
Returns body statement or expression. Body is null if the form of the let statement is similar to a VariableDeclaration, with no curly-brace. (This form is used to define let-bound variables in the scope of the current block.)

public GetBody ( ) : AstNode
Результат AstNode

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

Returns left paren position, -1 if missing
public GetLp ( ) : int
Результат int

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

Returns right paren position, -1 if missing
public GetRp ( ) : int
Результат int

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

Returns variable list
public GetVariables ( ) : VariableDeclaration
Результат VariableDeclaration

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

public LetNode ( ) : System.Text
Результат System.Text

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

public LetNode ( int pos ) : System.Text
pos int
Результат System.Text

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

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

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

Sets body statement or expression.
Sets body statement or expression. Also sets the body parent to this node.
public SetBody ( AstNode body ) : void
body AstNode /// the body statement or expression. May be /// null /// . ///
Результат void

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

Sets left paren position
public SetLp ( int lp ) : void
lp int
Результат void

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

Sets both paren positions
public SetParens ( int lp, int rp ) : void
lp int
rp int
Результат void

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

Sets right paren position
public SetRp ( int rp ) : void
rp int
Результат void

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

Sets variable list.
Sets variable list. Sets list parent to this node.
/// if variables is /// null ///
public SetVariables ( VariableDeclaration variables ) : void
variables VariableDeclaration
Результат void

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

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

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

Visits this node, the variable list, and if present, the body expression or statement.
Visits this node, the variable list, and if present, the body expression or statement.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Результат void