C# 클래스 Rhino.Ast.ExpressionStatement

AST node representing an expression in a statement context.
AST node representing an expression in a statement context. The node type is Rhino.Token.EXPR_VOID if inside a function, or else Rhino.Token.EXPR_RESULT if inside a script.
상속: AstNode
파일 보기 프로젝트 열기: hazzik/Rhino.Net 1 사용 예제들

공개 메소드들

메소드 설명
ExpressionStatement ( ) : System.Text
ExpressionStatement ( AstNode expr ) : System.Text

Constructs a new ExpressionStatement wrapping the specified expression. Sets this node's position to the position of the wrapped node, and sets the wrapped node's position to zero. Sets this node's length to the length of the wrapped node.

ExpressionStatement ( AstNode expr, bool hasResult ) : System.Text

Constructs a new ExpressionStatement wrapping the specified expression. Sets this node's position to the position of the wrapped node, and sets the wrapped node's position to zero. Sets this node's length to the length of the wrapped node.

ExpressionStatement ( int pos, int len ) : System.Text
ExpressionStatement ( int pos, int len, AstNode expr ) : System.Text

Constructs a new ExpressionStatement

GetExpression ( ) : AstNode

Returns the wrapped expression

HasSideEffects ( ) : bool

Returns true if this node has side effects

SetExpression ( AstNode expression ) : void

Sets the wrapped expression, and sets its parent to this node.

Sets the wrapped expression, and sets its parent to this node.

SetHasResult ( ) : void

Called by the parser to set node type to EXPR_RESULT if this node is not within a Function.

Called by the parser to set node type to EXPR_RESULT if this node is not within a Function.

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

Visits this node, then the wrapped statement.

Visits this node, then the wrapped statement.

메소드 상세

ExpressionStatement() 공개 메소드

public ExpressionStatement ( ) : System.Text
리턴 System.Text

ExpressionStatement() 공개 메소드

Constructs a new ExpressionStatement wrapping the specified expression. Sets this node's position to the position of the wrapped node, and sets the wrapped node's position to zero. Sets this node's length to the length of the wrapped node.
public ExpressionStatement ( AstNode expr ) : System.Text
expr AstNode the wrapped expression
리턴 System.Text

ExpressionStatement() 공개 메소드

Constructs a new ExpressionStatement wrapping the specified expression. Sets this node's position to the position of the wrapped node, and sets the wrapped node's position to zero. Sets this node's length to the length of the wrapped node.
public ExpressionStatement ( AstNode expr, bool hasResult ) : System.Text
expr AstNode the wrapped expression
hasResult bool /// /// true /// if this expression has side /// effects. If true, sets node type to EXPR_RESULT, else to EXPR_VOID. ///
리턴 System.Text

ExpressionStatement() 공개 메소드

public ExpressionStatement ( int pos, int len ) : System.Text
pos int
len int
리턴 System.Text

ExpressionStatement() 공개 메소드

Constructs a new ExpressionStatement
/// if /// expr /// is null ///
public ExpressionStatement ( int pos, int len, AstNode expr ) : System.Text
pos int
len int
expr AstNode /// the wrapped /// AstNode /// . /// The /// ExpressionStatement /// 's bounds are set to those of expr, /// and expr's parent is set to this node. ///
리턴 System.Text

GetExpression() 공개 메소드

Returns the wrapped expression
public GetExpression ( ) : AstNode
리턴 AstNode

HasSideEffects() 공개 메소드

Returns true if this node has side effects
/// if expression has not yet /// been set. ///
public HasSideEffects ( ) : bool
리턴 bool

SetExpression() 공개 메소드

Sets the wrapped expression, and sets its parent to this node.
Sets the wrapped expression, and sets its parent to this node.
/// } if expression is /// null ///
public SetExpression ( AstNode expression ) : void
expression AstNode
리턴 void

SetHasResult() 공개 메소드

Called by the parser to set node type to EXPR_RESULT if this node is not within a Function.
Called by the parser to set node type to EXPR_RESULT if this node is not within a Function.
public SetHasResult ( ) : void
리턴 void

ToSource() 공개 메소드

public ToSource ( int depth ) : string
depth int
리턴 string

Visit() 공개 메소드

Visits this node, then the wrapped statement.
Visits this node, then the wrapped statement.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
리턴 void