AARCHMRS Schema 2.7.4

↚ Home

AST.StatementBlock object

A model representing multiple ASL statements. For example:

x = 5;
z = 3;

object

Properties Type Description
_meta Meta
See Meta for more information.
_type
Enum
AST.StatementBlock
statements
array [
#
If
]

The statements that make up the expression block.

Additional Properties
Not Allowed
◊ Required
Properties marked with ◊ are required properties.
Examples
{
    "_type": "AST.StatementBlock", 
    "statements": [
        {
            "_type": "AST.Assignment", 
            "var": {
                "_type": "AST.Identifier", 
                "value": "x"
            }, 
            "val": {
                "_type": "AST.Integer", 
                "value": 5
            }
        }, 
        {
            "_type": "AST.Assignment", 
            "var": {
                "_type": "AST.Identifier", 
                "value": "z"
            }, 
            "val": {
                "_type": "AST.Integer", 
                "value": 3
            }
        }
    ]
}

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

{
  "title": "Statement Block",
  "info": [
    "A model representing multiple ASL statements. For example:",
    [
      "```",
      "x = 5;",
      "z = 3;",
      "```"
    ]
  ],
  "examples": [
    {
      "_type": "AST.StatementBlock",
      "statements": [
        {
          "_type": "AST.Assignment",
          "var": {
            "_type": "AST.Identifier",
            "value": "x"
          },
          "val": {
            "_type": "AST.Integer",
            "value": 5
          }
        },
        {
          "_type": "AST.Assignment",
          "var": {
            "_type": "AST.Identifier",
            "value": "z"
          },
          "val": {
            "_type": "AST.Integer",
            "value": 3
          }
        }
      ]
    }
  ],
  "properties": {
    "_meta": {
      "$ref": "../Meta.json"
    },
    "_type": {
      "enum": [
        "AST.StatementBlock"
      ]
    },
    "statements": {
      "info": [
        "The statements that make up the expression block."
      ],
      "type": "array",
      "items": {
        "oneOf": [
          {
            "$ref": "#"
          },
          {
            "$ref": "Assignment.json"
          },
          {
            "$ref": "Return.json"
          },
          {
            "$ref": "Function.json"
          },
          {
            "$ref": "If.json"
          },
          {
            "$ref": "ForLoop.json"
          },
          {
            "$ref": "VariableDeclaration.json"
          }
        ]
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-04/schema#"
}