NUnary

NodeAstNodeNExprloreline.NUnary (Class)

Represents a unary operation expression (!x, -x, etc).

Instance Members

op: Anonymous

Operator type.


operand: NExpr

Operand expression.


type(): String
Returns
String

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

toJson(): Dynamic

Converts the unary operation to a JSON representation.

Returns Description
Dynamic Dynamic object containing operation data

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

Creates a new unary operation node.

Name Type Default Description
id NodeId
pos Position Position in source where this operation appears
op Anonymous Unary operator type
operand NExpr Operand expression
leadingComments Array<Comment> (optional) Optional comments before
trailingComments Array<Comment> (optional) Optional comments after the operation