A model representing a declaration statement in ASL.
An example rendering would be: var x = 42.
| Properties | Type | Description |
|---|---|---|
| _meta | Meta |
See
Meta
for more information.
|
| _type |
|
|
| val◊ | BinaryOp |
The value to initialise the variable to.
See
definitions.expression in
BinaryOp
for more information.
|
| var◊ | Identifier |
The variable to be declared.
See
Identifier
for more information.
|
|
||
|
||
{
"_type": "AST.VariableDeclaration",
"var": {
"_type": "AST.Identifier",
"value": "x"
},
"val": {
"_type": "AST.Integer",
"value": 42
}
}
{
"info": [
"A model representing a declaration statement in ASL.",
"An example rendering would be: `var x = 42`."
],
"additionalProperties": false,
"examples": [
{
"_type": "AST.VariableDeclaration",
"var": {
"_type": "AST.Identifier",
"value": "x"
},
"val": {
"_type": "AST.Integer",
"value": 42
}
}
],
"properties": {
"_meta": {
"$ref": "../Meta.json"
},
"_type": {
"enum": [
"AST.VariableDeclaration"
]
},
"var": {
"info": [
"The variable to be declared."
],
"$ref": "Identifier.json"
},
"val": {
"info": [
"The value to initialise the variable to."
],
"$ref": "BinaryOp.json#/definitions/expression"
}
},
"required": [
"var",
"val"
],
"type": "object",
"title": "VariableDeclaration",
"$schema": "http://json-schema.org/draft-04/schema#"
}