C# Класс 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 .

Наследование: AstNode
Показать файл Открыть проект Примеры использования класса

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

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

Описание методов

GetOperand() публичный Метод

public GetOperand ( ) : AstNode
Результат AstNode

GetOperator() публичный Метод

Returns operator token – alias for Rhino.Node.GetType()
public GetOperator ( ) : int
Результат int

IsPostfix() публичный Метод

Returns whether the operator is postfix
public IsPostfix ( ) : bool
Результат bool

IsPrefix() публичный Метод

Returns whether the operator is prefix
public IsPrefix ( ) : bool
Результат bool

SetIsPostfix() публичный Метод

Sets whether the operator is postfix
public SetIsPostfix ( bool isPostfix ) : void
isPostfix bool
Результат void

SetOperand() публичный Метод

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
Результат void

SetOperator() публичный Метод

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
Результат void

ToSource() публичный Метод

public ToSource ( int depth ) : string
depth int
Результат string

UnaryExpression() публичный Метод

public UnaryExpression ( ) : System
Результат System

UnaryExpression() публичный Метод

public UnaryExpression ( int pos ) : System
pos int
Результат System

UnaryExpression() публичный Метод

Constructs a new postfix UnaryExpression
public UnaryExpression ( int pos, int len ) : System
pos int
len int
Результат System

UnaryExpression() публичный Метод

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
Результат System

UnaryExpression() публичный Метод

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
Результат System

Visit() публичный Метод

Visits this node, then the operand.
Visits this node, then the operand.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Результат void