AARCHMRS Schema 2.5.3

↚ Home

Type oneOf [ ... ]

A model representing a type in ASL.

An example rendering would be:

  • bits(32)
  • integer

oneOf object

Properties Type Description
_meta Meta
See Meta for more information.
_type
Enum
AST.Type
name
oneOf [
]

The type definition.

oneOf Identifier

oneOf Function

Additional Properties
Not Allowed
◊ Required
Properties marked with ◊ are required properties.

oneOf string

Examples
{
    "_type": "AST.Type", 
    "name": {
        "_type": "AST.Function", 
        "name": "bits", 
        "arguments": [
            {
                "_type": "AST.Integer", 
                "value": 32
            }
        ]
    }
}
{
    "_type": "AST.Type", 
    "name": {
        "_type": "AST.Identifier", 
        "value": "integer"
    }
}

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

{
  "info": [
    "A model representing a type in ASL.",
    "An example rendering would be: ",
    [
      " -  `bits(32)`",
      " -  `integer`"
    ]
  ],
  "examples": [
    {
      "_type": "AST.Type",
      "name": {
        "_type": "AST.Function",
        "name": "bits",
        "arguments": [
          {
            "_type": "AST.Integer",
            "value": 32
          }
        ]
      }
    },
    {
      "_type": "AST.Type",
      "name": {
        "_type": "AST.Identifier",
        "value": "integer"
      }
    }
  ],
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "_meta": {
          "$ref": "../Meta.json"
        },
        "_type": {
          "enum": [
            "AST.Type"
          ]
        },
        "name": {
          "info": [
            "The type definition."
          ],
          "oneOf": [
            {
              "$ref": "Identifier.json"
            },
            {
              "$ref": "Function.json"
            }
          ]
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    {
      "type": "string"
    }
  ],
  "title": "Type",
  "$schema": "http://json-schema.org/draft-04/schema#"
}