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

공개 메소드들

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