new Array()
Defines an array structure
Properties:
| Name | Type | Description |
|---|---|---|
items |
Entry | Expr | Variable |
List of array items |
shortForm |
boolean |
Indicate if the short array syntax is used, ex |
- Source:
Example
// PHP code :
[1, 'foo' => 'bar', 3]
// AST structure :
{
"kind": "array",
"shortForm": true
"items": [
{"kind": "number", "value": "1"},
{
"kind": "entry",
"key": {"kind": "string", "value": "foo", "isDoubleQuote": false},
"value": {"kind": "string", "value": "bar", "isDoubleQuote": false}
},
{"kind": "number", "value": "3"}
]
}
Extends
Methods
destroy()
Destroying an unused node
- Inherited From:
- Source:
includeToken(parser)
Includes current token position of the parser
Parameters:
| Name | Type | Description |
|---|---|---|
parser |
* |
- Inherited From:
- Source:
setTrailingComments(docs)
Attach comments to current node
Parameters:
| Name | Type | Description |
|---|---|---|
docs |
* |
- Inherited From:
- Source: