C# Class Rhino.Ast.UnaryExpression

AST node representing unary operators such as ++ , ~ , typeof and delete . The type field is set to the appropriate Token type for the operator. The node length spans from the operator to the end of the operand (for prefix operators) or from the start of the operand to the operator (for postfix).

The default xml namespace = <expr> statement in E4X (JavaScript 1.6) is represented as a UnaryExpression of node type Rhino.Token.DEFAULTNAMESPACE , wrapped with an ExpressionStatement .

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

Méthodes publiques

Méthode Description
GetOperand ( ) : AstNode
GetOperator ( ) : int

Returns operator token – alias for Rhino.Node.GetType()

IsPostfix ( ) : bool

Returns whether the operator is postfix

IsPrefix ( ) : bool

Returns whether the operator is prefix

SetIsPostfix ( bool isPostfix ) : void

Sets whether the operator is postfix

SetOperand ( AstNode operand ) : void

Sets the operand, and sets its parent to be this node.

Sets the operand, and sets its parent to be this node.

SetOperator ( int @operator ) : void

Sets operator – same as Rhino.Node.SetType(int) , but throws an exception if the operator is invalid

ToSource ( int depth ) : string
UnaryExpression ( ) : System
UnaryExpression ( int pos ) : System
UnaryExpression ( int pos, int len ) : System

Constructs a new postfix UnaryExpression

UnaryExpression ( int @operator, int operatorPosition, AstNode operand ) : System

Constructs a new prefix UnaryExpression.

Constructs a new prefix UnaryExpression.

UnaryExpression ( int @operator, int operatorPosition, AstNode operand, bool postFix ) : System

Constructs a new UnaryExpression with the specified operator and operand.

Constructs a new UnaryExpression with the specified operator and operand. It sets the parent of the operand, and sets its own bounds to encompass the operator and operand.

Visit ( NodeVisitor v ) : void

Visits this node, then the operand.

Visits this node, then the operand.

Method Details

GetOperand() public méthode

public GetOperand ( ) : AstNode
Résultat AstNode

GetOperator() public méthode

Returns operator token – alias for Rhino.Node.GetType()
public GetOperator ( ) : int
Résultat int

IsPostfix() public méthode

Returns whether the operator is postfix
public IsPostfix ( ) : bool
Résultat bool

IsPrefix() public méthode

Returns whether the operator is prefix
public IsPrefix ( ) : bool
Résultat bool

SetIsPostfix() public méthode

Sets whether the operator is postfix
public SetIsPostfix ( bool isPostfix ) : void
isPostfix bool
Résultat void

SetOperand() public méthode

Sets the operand, and sets its parent to be this node.
Sets the operand, and sets its parent to be this node.
/// } if /// operand /// is /// null ///
public SetOperand ( AstNode operand ) : void
operand AstNode
Résultat void

SetOperator() public méthode

Sets operator – same as Rhino.Node.SetType(int) , but throws an exception if the operator is invalid
/// if operator is not a valid /// Token code ///
public SetOperator ( int @operator ) : void
@operator int
Résultat void

ToSource() public méthode

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

UnaryExpression() public méthode

public UnaryExpression ( ) : System
Résultat System

UnaryExpression() public méthode

public UnaryExpression ( int pos ) : System
pos int
Résultat System

UnaryExpression() public méthode

Constructs a new postfix UnaryExpression
public UnaryExpression ( int pos, int len ) : System
pos int
len int
Résultat System

UnaryExpression() public méthode

Constructs a new prefix UnaryExpression.
Constructs a new prefix UnaryExpression.
public UnaryExpression ( int @operator, int operatorPosition, AstNode operand ) : System
@operator int
operatorPosition int
operand AstNode
Résultat System

UnaryExpression() public méthode

Constructs a new UnaryExpression with the specified operator and operand.
Constructs a new UnaryExpression with the specified operator and operand. It sets the parent of the operand, and sets its own bounds to encompass the operator and operand.
/// } if /// operand /// is /// null ///
public UnaryExpression ( int @operator, int operatorPosition, AstNode operand, bool postFix ) : System
@operator int
operatorPosition int the absolute position of the operator.
operand AstNode the operand expression
postFix bool true if the operator follows the operand. Int
Résultat System

Visit() public méthode

Visits this node, then the operand.
Visits this node, then the operand.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Résultat void