summary refs log tree commit diff stats
path: root/compiler/c2nim/tests/enum.h
blob: 16bc59058fb0b63fc904d3cf3cf79275ac5b1adc (plain) (blame)
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
enum vehicles
{
	car = 0x10,
	truck,
	boat = 0x01,
	ship = 1,
	speedboat = 1,
	bicycle = 4,
	bobycar
};

enum
{
	red = 4,
	green = 2,
	blue
};

typedef enum food
{
	bread = 4,
	toast = 4,
	bun = 0x04,
	cucumber = 2,
	chocolate = 6
};

typedef enum numbers
{
	one = 1,
	two,
	nten = - 10,
	nnine,
	four = 4,
	three = + 3,
	positivenine = + 9,
	nfour = - 4,
	negativeten = -10
};