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

공개 메소드들

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