C# Class 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
Inheritance: AstNode, DestructuringForm
Afficher le fichier Open project: hazzik/Rhino.Net Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

AddElement() public méthode

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
Résultat void

GetElements() public méthode

Returns the element list.
Returns the element list. Returns an immutable empty list if there are no elements.
public GetElements ( ) : IList
Résultat IList

IsDestructuring() public méthode

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
Résultat bool

ObjectLiteral() public méthode

public ObjectLiteral ( ) : System.Collections.Generic
Résultat System.Collections.Generic

ObjectLiteral() public méthode

public ObjectLiteral ( int pos ) : System.Collections.Generic
pos int
Résultat System.Collections.Generic

ObjectLiteral() public méthode

public ObjectLiteral ( int pos, int len ) : System.Collections.Generic
pos int
len int
Résultat System.Collections.Generic

SetElements() public méthode

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 /// . ///
Résultat void

SetIsDestructuring() public méthode

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
Résultat void

ToSource() public méthode

public ToSource ( int depth ) : string
depth int
Résultat string

Visit() public méthode

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
Résultat void