AARCHMRS Schema 2.7.4

↚ Home

AST.Return object

A model representing a return statement in ASL.

An example rendering would be:

  • return
  • return 42

object

Properties Type Description
_meta Meta
See Meta for more information.
_type
Enum
AST.Return
val
oneOf [
null
]
oneOf BinaryOp

The value to be returned in the statement.

oneOf null
Additional Properties
Not Allowed
◊ Required
Properties marked with ◊ are required properties.
Examples
{
    "_type": "AST.Return", 
    "val": null
}
{
    "_type": "AST.Return", 
    "val": {
        "_type": "AST.Integer", 
        "value": 42
    }
}

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

{
  "info": [
    "A model representing a return statement in ASL.",
    "An example rendering would be:",
    [
      " - `return`",
      " - `return 42`"
    ]
  ],
  "examples": [
    {
      "_type": "AST.Return",
      "val": null
    },
    {
      "_type": "AST.Return",
      "val": {
        "_type": "AST.Integer",
        "value": 42
      }
    }
  ],
  "additionalProperties": false,
  "properties": {
    "_meta": {
      "$ref": "../Meta.json"
    },
    "_type": {
      "enum": [
        "AST.Return"
      ]
    },
    "val": {
      "oneOf": [
        {
          "info": [
            "The value to be returned in the statement."
          ],
          "$ref": "BinaryOp.json#/definitions/expression"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "val"
  ],
  "type": "object",
  "title": "Return",
  "$schema": "http://json-schema.org/draft-04/schema#"
}