NAssign

NodeAstNodeNExprloreline.NAssign (Class)

Represents an assignment expression (a = b, a += b, etc).

Instance Members

target: NExpr

Target expression being assigned to.


op: Anonymous

Assignment operator type.


value: NExpr

Value being assigned.


type(): String
Returns
String

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

toJson(): Dynamic

Converts the assignment to a JSON representation.

Returns Description
Dynamic Dynamic object containing assignment data

new(id: NodeId, pos: Position, target: NExpr, op: Anonymous, value: NExpr, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): Void

Creates a new assignment node.

Name Type Default Description
id NodeId
pos Position Position in source where this assignment appears
target NExpr Target expression being assigned to
op Anonymous Assignment operator type
value NExpr Value being assigned
leadingComments Array<Comment> (optional) Optional comments before the assignment
trailingComments Array<Comment> (optional) Optional comments after the assignment

Metadata

Name Parameters
:hxGen -