NObjectField
Represents an object field in the AST (name-value pair).
Instance Members
name: StringName of the field.
value: NExprValue expression of the field.
type(): String| Returns |
|---|
| String |
each(handleNode: Function): Void| Name | Type |
|---|---|
handleNode |
Function |
toJson(): DynamicConverts 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>): VoidCreates 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 |