C# Class 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 .

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

Méthodes publiques

Méthode Description
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.

Method Details

GetBody() public méthode

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
Résultat AstNode

GetLp() public méthode

Returns left paren position, -1 if missing
public GetLp ( ) : int
Résultat int

GetRp() public méthode

Returns right paren position, -1 if missing
public GetRp ( ) : int
Résultat int

GetVariables() public méthode

Returns variable list
public GetVariables ( ) : VariableDeclaration
Résultat VariableDeclaration

LetNode() public méthode

public LetNode ( ) : System.Text
Résultat System.Text

LetNode() public méthode

public LetNode ( int pos ) : System.Text
pos int
Résultat System.Text

LetNode() public méthode

public LetNode ( int pos, int len ) : System.Text
pos int
len int
Résultat System.Text

SetBody() public méthode

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 /// . ///
Résultat void

SetLp() public méthode

Sets left paren position
public SetLp ( int lp ) : void
lp int
Résultat void

SetParens() public méthode

Sets both paren positions
public SetParens ( int lp, int rp ) : void
lp int
rp int
Résultat void

SetRp() public méthode

Sets right paren position
public SetRp ( int rp ) : void
rp int
Résultat void

SetVariables() public méthode

Sets variable list.
Sets variable list. Sets list parent to this node.
/// if variables is /// null ///
public SetVariables ( VariableDeclaration variables ) : void
variables VariableDeclaration
Résultat void

ToSource() public méthode

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

Visit() public méthode

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
Résultat void