AARCHMRS Schema 2.5.3

↚ Home

TypeAnnotation oneOf [ ... ]

A model representing a type annotation in ASL, for example UNKNOWN:bits(32).

oneOf object

Properties Type Description
_meta Meta
See Meta for more information.
_type
Enum
AST.TypeAnnotation
type Type

The type of annotation being applied to the variable.

See Type for more information.
var
anyOf [
]

The Identifier that is annotated.

anyOf Identifier

anyOf DotAtom

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

oneOf string

Pattern
.+::.+
Examples
{
    "_type": "AST.TypeAnnotation", 
    "var": {
        "_type": "AST.Identifier", 
        "value": "UNKNOWN"
    }, 
    "type": {
        "_type": "AST.Type", 
        "name": {
            "_type": "AST.Function", 
            "name": "bits", 
            "arguments": [
                {
                    "_type": "AST.Integer", 
                    "value": 32
                }
            ]
        }
    }
}

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

{
  "info": [
    "A model representing a type annotation in ASL, for example `UNKNOWN:bits(32)`."
  ],
  "examples": [
    {
      "_type": "AST.TypeAnnotation",
      "var": {
        "_type": "AST.Identifier",
        "value": "UNKNOWN"
      },
      "type": {
        "_type": "AST.Type",
        "name": {
          "_type": "AST.Function",
          "name": "bits",
          "arguments": [
            {
              "_type": "AST.Integer",
              "value": 32
            }
          ]
        }
      }
    }
  ],
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "_meta": {
          "$ref": "../Meta.json"
        },
        "_type": {
          "enum": [
            "AST.TypeAnnotation"
          ]
        },
        "var": {
          "info": [
            "The Identifier that is annotated."
          ],
          "anyOf": [
            {
              "$ref": "Identifier.json"
            },
            {
              "$ref": "DotAtom.json"
            }
          ]
        },
        "type": {
          "info": [
            "The type of annotation being applied to the variable."
          ],
          "$ref": "Type.json"
        }
      },
      "required": [
        "var",
        "type"
      ],
      "type": "object"
    },
    {
      "type": "string",
      "pattern": ".+::.+"
    }
  ],
  "title": "TypeAnnotation",
  "$schema": "http://json-schema.org/draft-04/schema#"
}