summaryrefslogtreecommitdiff
path: root/parse/types.def
blob: c19e7d19d0f706f2e79d06d3aaa8317e36928df4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* type, pretty, stack */
Ty(Tybad, NULL, 0)
Ty(Tyvoid, "void", 0)

/* start integer types.
 * Keep them ordered between start
 * and end for faster
 * comparisons.*/
Ty(Tybool, "bool", 0)
Ty(Tychar, "char", 0)

Ty(Tyint8, "int8", 0)
Ty(Tyint16, "int16", 0)
Ty(Tyint, "int", 0)
Ty(Tyint32, "int32", 0)
Ty(Tyint64, "int64", 0)

Ty(Tybyte, "byte", 0)
Ty(Tyuint8, "uint8", 0)
Ty(Tyuint16, "uint16", 0)
Ty(Tyuint, "uint", 0)
Ty(Tyuint32, "uint32", 0)
Ty(Tyuint64, "uint64", 0)

/*end integer types*/
Ty(Tyflt32, "flt32", 0)
Ty(Tyflt64, "flt64", 0)
/* end primitive types */
Ty(Tyvalist, NULL, 0)

/* end atomic types */
Ty(Typtr, NULL, 0)
Ty(Tyfunc, NULL, 1)

/* these types live on the stack */
Ty(Tyslice, NULL, 1)
Ty(Tyarray, NULL, 1)
Ty(Tytuple, NULL, 1)
Ty(Tystruct, NULL, 1)
Ty(Tyunion, NULL, 1)

/* these have no memory repr */
Ty(Tyvar, NULL, 1)
Ty(Typaram, NULL, 1)
Ty(Tyunres, NULL, 1) /* unresolved */
Ty(Tyname, NULL, 1)
Ty(Tygeneric, NULL, 1)
Ty(Tycode, NULL, 0)	/* code ptr without env: backend-only */