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
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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