From b0d95956fcade40a2d608ccea79e2e989f97b72f Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 5 Aug 2022 04:27:38 +0200 Subject: more struct --- bootstrap/test.cff | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bootstrap/test.cff') diff --git a/bootstrap/test.cff b/bootstrap/test.cff index 651c2ce..f6deb67 100644 --- a/bootstrap/test.cff +++ b/bootstrap/test.cff @@ -11,12 +11,17 @@ union Val { y f64, } +enum Color { + Red, Green, Blue +} + static xs *void = {}; extern fn main (argc int, argv **u8) void { extern fn printf(fmt *const u8, ...) int; - let x Vec2f = { .y: 1, .x: 2.4 }; + let colors [3]Color = { :Red, :Green, :Blue } ; + let x = Vec2f { .y: 1, .x: 2.4 }; printf("v = { %g, %g }\n", x.x, x.y); let is [10]int = { [4] = 1, 2, [1 - 1] = 3 }; -- cgit v1.2.3