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

공개 메소드들

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