Update 'Type Specifiers'

Sasha Koshka 2022-10-12 07:34:39 +00:00
parent d42c20117c
commit b2d12c0093

@ -13,16 +13,8 @@ Int:5
# Dynamic array of integers # Dynamic array of integers
{Int ..} {Int ..}
# Static array of 5 integers, with default values # Static array of 5 integers
Int:5:<398 298 17 40 98> Int:5
# Object that has two integer members: x and y
Obj:(
.ro x:Int
.ro y:Int)
# Variable length array of objects that have a single integer member called x
{Obj:(.x Int) ..}
``` ```
The first item is always the name that the type inherits from. If the first item is wrapped in curly braces, the type specifier describes a pointer to whatever type is inside of it. If, after the type that is inside of it, there is an elipsis token, the type specifier describes an array of dynamic length. The first item is always the name that the type inherits from. If the first item is wrapped in curly braces, the type specifier describes a pointer to whatever type is inside of it. If, after the type that is inside of it, there is an elipsis token, the type specifier describes an array of dynamic length.