NAccess

NodeAstNodeNExprloreline.NAccess (Class)

Represents a field access expression (obj.field).

Instance Members

target: Null<NExpr>

Optional target object being accessed.


name: String

Name of the accessed field.


type(): String
Returns
String

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

toJson(): Dynamic

Converts the field access to a JSON representation.

Returns Description
Dynamic Dynamic object containing access data

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

Creates a new field access node.

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

Metadata

Name Parameters
:hxGen -