AARCHMRS Schema 2.7.4

↚ Home

AST.ArrayAccessOp object

A model representing an array access:

  • MYARRAY[[m]]
  • MYARRAY[[1]]

object

Properties Type Description
_meta Meta
See Meta for more information.
_type
Enum
AST.ArrayAccessOp
index BinaryOp

The ArrayAccessOp's index.

See definitions.expression in BinaryOp for more information.
var BinaryOp

The array object to be indexed.

See definitions.expression in BinaryOp for more information.
Additional Properties
Not Allowed
◊ Required
Properties marked with ◊ are required properties.
Examples
{
    "_type": "AST.ArrayAccessOp", 
    "var": {
        "_type": "AST.Identifier", 
        "value": "MYARRAY"
    }, 
    "index": {
        "_type": "AST.Identifier", 
        "value": "m"
    }
}
{
    "_type": "AST.ArrayAccessOp", 
    "var": {
        "_type": "AST.Identifier", 
        "value": "MYARRAY"
    }, 
    "index": {
        "_type": "AST.Integer", 
        "value": 1
    }
}

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

{
  "additionalProperties": false,
  "info": [
    "A model representing an array access:",
    [
      " - `MYARRAY[[m]]`",
      " - `MYARRAY[[1]]`"
    ]
  ],
  "examples": [
    {
      "_type": "AST.ArrayAccessOp",
      "var": {
        "_type": "AST.Identifier",
        "value": "MYARRAY"
      },
      "index": {
        "_type": "AST.Identifier",
        "value": "m"
      }
    },
    {
      "_type": "AST.ArrayAccessOp",
      "var": {
        "_type": "AST.Identifier",
        "value": "MYARRAY"
      },
      "index": {
        "_type": "AST.Integer",
        "value": 1
      }
    }
  ],
  "properties": {
    "_meta": {
      "$ref": "../Meta.json"
    },
    "_type": {
      "enum": [
        "AST.ArrayAccessOp"
      ]
    },
    "var": {
      "info": [
        "The array object to be indexed."
      ],
      "$ref": "BinaryOp.json#/definitions/expression"
    },
    "index": {
      "info": [
        "The ArrayAccessOp's index."
      ],
      "$ref": "BinaryOp.json#/definitions/expression"
    }
  },
  "required": [
    "var",
    "index"
  ],
  "title": "ArrayAccessOp",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema#"
}