NArrayAccess
Represents an array access expression (array[index]).
Instance Members
target: NExprTarget array being accessed.
index: NExprIndex expression.
type(): String| Returns |
|---|
| String |
each(handleNode: Function): Void| Name | Type |
|---|---|
handleNode |
Function |
toJson(): DynamicConverts the array access to a JSON representation.
| Returns | Description |
|---|---|
| Dynamic | Dynamic object containing array access data |
new(id: NodeId, pos: Position, target: NExpr, index: NExpr, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): VoidCreates a new array access node.
| Name | Type | Default | Description |
|---|---|---|---|
id |
NodeId | ||
pos |
Position | Position in source where this access appears | |
target |
NExpr | Target array expression | |
index |
NExpr | Index expression | |
leadingComments |
Array<Comment> | (optional) | Optional comments before the access |
trailingComments |
Array<Comment> | (optional) | Optional comments after the access |