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

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

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

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

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

Returns true if this is a getter function.
Returns true if this is a getter function.
public IsGetter ( ) : bool
Результат bool

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

Returns true if this is a setter function.
Returns true if this is a setter function.
public IsSetter ( ) : bool
Результат bool

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

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

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

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

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

public ObjectProperty ( int pos, int len ) : System
pos int
len int
Результат System

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

Marks this node as a "getter" property.
Marks this node as a "getter" property.
public SetIsGetter ( ) : void
Результат void

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

Marks this node as a "setter" property.
Marks this node as a "setter" property.
public SetIsSetter ( ) : void
Результат void

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

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

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

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