C# Class Rhino.Ast.ObjectProperty

AST node for a single name:value entry in an Object literal.
AST node for a single name:value entry in an Object literal. For simple entries, the node type is Rhino.Token.COLON , and the name (left side expression) is either a Name , a StringLiteral or a NumberLiteral .

This node type is also used for getter/setter properties in object literals. In this case the node bounds include the "get" or "set" keyword. The left-hand expression in this case is always a Name , and the overall node type is Rhino.Token.GET or Rhino.Token.SET , as appropriate.

The operatorPosition field is meaningless if the node is a getter or setter.

ObjectProperty : PropertyName : AssignmentExpression PropertyName : Identifier StringLiteral NumberLiteral
Inheritance: InfixExpression
Exibir arquivo Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
IsGetter ( ) : bool

Returns true if this is a getter function.

Returns true if this is a getter function.

IsSetter ( ) : bool

Returns true if this is a setter function.

Returns true if this is a setter function.

ObjectProperty ( ) : System
ObjectProperty ( int pos ) : System
ObjectProperty ( int pos, int len ) : System
SetIsGetter ( ) : void

Marks this node as a "getter" property.

Marks this node as a "getter" property.

SetIsSetter ( ) : void

Marks this node as a "setter" property.

Marks this node as a "setter" property.

SetNodeType ( int nodeType ) : void

Sets the node type.

Sets the node type. Must be one of Rhino.Token.COLON , Rhino.Token.GET , or Rhino.Token.SET .

ToSource ( int depth ) : string

Method Details

IsGetter() public method

Returns true if this is a getter function.
Returns true if this is a getter function.
public IsGetter ( ) : bool
return bool

IsSetter() public method

Returns true if this is a setter function.
Returns true if this is a setter function.
public IsSetter ( ) : bool
return bool

ObjectProperty() public method

public ObjectProperty ( ) : System
return System

ObjectProperty() public method

public ObjectProperty ( int pos ) : System
pos int
return System

ObjectProperty() public method

public ObjectProperty ( int pos, int len ) : System
pos int
len int
return System

SetIsGetter() public method

Marks this node as a "getter" property.
Marks this node as a "getter" property.
public SetIsGetter ( ) : void
return void

SetIsSetter() public method

Marks this node as a "setter" property.
Marks this node as a "setter" property.
public SetIsSetter ( ) : void
return void

SetNodeType() public method

Sets the node type.
Sets the node type. Must be one of Rhino.Token.COLON , Rhino.Token.GET , or Rhino.Token.SET .
/// if /// nodeType /// is invalid ///
public SetNodeType ( int nodeType ) : void
nodeType int
return void

ToSource() public method

public ToSource ( int depth ) : string
depth int
return string