C# Класс Rhino.Ast.ObjectLiteral

AST node for an Object literal (also called an Object initialiser in Ecma-262).
AST node for an Object literal (also called an Object initialiser in Ecma-262). The elements list will always be non- null , although the list will have no elements if the Object literal is empty.

Node type is Rhino.Token.OBJECTLIT .

ObjectLiteral : {} { PropertyNameAndValueList } PropertyNameAndValueList : PropertyName : AssignmentExpression PropertyNameAndValueList , PropertyName : AssignmentExpression PropertyName : Identifier StringLiteral NumericLiteral
Наследование: AstNode, DestructuringForm
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddElement ( ObjectProperty element ) : void

Adds an element to the list, and sets its parent to this node.

Adds an element to the list, and sets its parent to this node.

GetElements ( ) : IList

Returns the element list.

Returns the element list. Returns an immutable empty list if there are no elements.

IsDestructuring ( ) : bool

Returns true if this node is in a destructuring position: a function parameter, the target of a variable initializer, the iterator of a for..in loop, etc.

Returns true if this node is in a destructuring position: a function parameter, the target of a variable initializer, the iterator of a for..in loop, etc.

ObjectLiteral ( ) : System.Collections.Generic
ObjectLiteral ( int pos ) : System.Collections.Generic
ObjectLiteral ( int pos, int len ) : System.Collections.Generic
SetElements ( IList elements ) : void

Sets the element list, and updates the parent of each element.

Sets the element list, and updates the parent of each element. Replaces any existing elements.

SetIsDestructuring ( bool destructuring ) : void

Marks this node as being a destructuring form - that is, appearing in a context such as for ([a, b] in ...) where it's the target of a destructuring assignment.

ToSource ( int depth ) : string
Visit ( NodeVisitor v ) : void

Visits this node, then visits each child property node, in lexical (source) order.

Visits this node, then visits each child property node, in lexical (source) order.

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

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

Adds an element to the list, and sets its parent to this node.
Adds an element to the list, and sets its parent to this node.
/// } if element is /// null ///
public AddElement ( ObjectProperty element ) : void
element ObjectProperty the property node to append to the end of the list
Результат void

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

Returns the element list.
Returns the element list. Returns an immutable empty list if there are no elements.
public GetElements ( ) : IList
Результат IList

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

Returns true if this node is in a destructuring position: a function parameter, the target of a variable initializer, the iterator of a for..in loop, etc.
Returns true if this node is in a destructuring position: a function parameter, the target of a variable initializer, the iterator of a for..in loop, etc.
public IsDestructuring ( ) : bool
Результат bool

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

public ObjectLiteral ( ) : System.Collections.Generic
Результат System.Collections.Generic

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

public ObjectLiteral ( int pos ) : System.Collections.Generic
pos int
Результат System.Collections.Generic

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

public ObjectLiteral ( int pos, int len ) : System.Collections.Generic
pos int
len int
Результат System.Collections.Generic

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

Sets the element list, and updates the parent of each element.
Sets the element list, and updates the parent of each element. Replaces any existing elements.
public SetElements ( IList elements ) : void
elements IList /// the element list. Can be /// null /// . ///
Результат void

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

Marks this node as being a destructuring form - that is, appearing in a context such as for ([a, b] in ...) where it's the target of a destructuring assignment.
public SetIsDestructuring ( bool destructuring ) : void
destructuring bool
Результат void

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

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

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

Visits this node, then visits each child property node, in lexical (source) order.
Visits this node, then visits each child property node, in lexical (source) order.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Результат void