AARCHMRS Schema 2.9.6

↚ Home

AST.VariableDeclaration object

A model representing a declaration statement in ASL.

An example rendering would be: var x = 42.

object

Properties Type Description
_meta Meta
See Meta for more information.
_type
Enum
AST.VariableDeclaration
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.
Additional Properties
Not Allowed
◊ Required
Properties marked with ◊ are required properties.
Examples
{
    "_type": "AST.VariableDeclaration", 
    "var": {
        "_type": "AST.Identifier", 
        "value": "x"
    }, 
    "val": {
        "_type": "AST.Integer", 
        "value": 42
    }
}

Schema http://json-schema.org/draft-04/schema#

{
  "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#"
}