Package ast.struct

Types

Link copied to clipboard
class Struct(    val name: Identifier,     val fields: Array<StructField>,     val methods: Array<StructMethod>) : Statement

Represents a structure type.

Link copied to clipboard
class StructField(    val name: Identifier,     val type: Type,     val default: Expression?)

Represents the definition of a field on a structure.

Link copied to clipboard
class StructInstance(val name: Identifier, val fields: Map<Identifier, Expression>) : Expression

Represents the instantiation of Struct.

Link copied to clipboard
class StructMethod(    val name: Identifier,     val parameters: Array<FunctionParameter>,     val retType: Type,     val body: Block)

Represents the definition of a method on a structure.