NBinary

NodeAstNodeNExprloreline.NBinary (Class)

Represents a binary operation expression (a + b, a && b, etc).

Instance Members

left: NExpr

Left operand expression.


op: Anonymous

Operator type.


Right operand expression.


type(): String
Returns
String

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

toJson(): Dynamic

Converts the binary operation to a JSON representation.

Returns Description
Dynamic Dynamic object containing operation data

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

Creates a new binary operation node.

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