Array

data class Array(val title: String, var typeName: String, var length: Expression) : Type, IsParent

Used to define array types

Example: [ "firstElement", "secondElement" ]

Constructors

Link copied to clipboard
constructor(title: String, typeName: String, length: Expression)

Properties

Link copied to clipboard

represents the number of elements of the array

Link copied to clipboard
open override var parent: IsParent?
Link copied to clipboard
open override val scope: SymbolTable?

is the scope to which the node belongs

Link copied to clipboard
open override val title: String

represents the name of the array

Link copied to clipboard

represents the type of the elements in the array

Functions

Link copied to clipboard
open override fun replaceChild(initial: AstObject, replacement: AstObject)

Is replacing a certain child of the class with another object of the same type If the two parameters don't have the same type, no block will be replaced. If the type of initial doesn't match any of the current node children, no child will be replaced

Link copied to clipboard
open override fun setParentForChildren()

Sets the object as a parent for its children