NObjectField

NodeAstNodeloreline.NObjectField (Class)

Represents an object field in the AST (name-value pair).

Instance Members

name: String

Name of the field.


value: NExpr

Value expression of the field.


type(): String
Returns
String

each(handleNode: Function): Void
Name Type
handleNode Function

toJson(): Dynamic

Converts the object field to a JSON representation.

Returns Description
Dynamic Dynamic object containing field data

new(id: NodeId, pos: Position, name: String, value: NExpr, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): Void

Creates a new object field node.

Name Type Default Description
id NodeId
pos Position Position in source where this field appears
name String Name of the field
value NExpr Value expression for the field
leadingComments Array<Comment> (optional) Optional comments before the field
trailingComments Array<Comment> (optional) Optional comments after the field